Add test script
Add a test script to verify that the template can be processed. Change-Id: Ie365c61dc1d10b78e4c85414978800a06b2e5ef0
This commit is contained in:
parent
d61681928c
commit
1ae38d7230
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash -x
|
||||
#
|
||||
# Test that the template can be applied
|
||||
#
|
||||
# Arguments:
|
||||
#
|
||||
# tmp_dir - Directory where it is possible to create temporary files.
|
||||
|
||||
tmp_dir="$1"
|
||||
out_dir="$tmp_dir/output"
|
||||
|
||||
# The templates are above the tools directory.
|
||||
template_dir=$(dirname $(dirname $0))
|
||||
|
||||
rm -rf $out_dir
|
||||
mkdir -p $out_dir
|
||||
cd $out_dir
|
||||
|
||||
cookiecutter -v $template_dir <<EOF
|
||||
testing
|
||||
openstack
|
||||
This package is for testing the templates.
|
||||
EOF
|
||||
|
||||
echo "Files created:"
|
||||
find $out_dir
|
Loading…
Reference in New Issue