Merge "Allow blank lines in node{} with apply test"

This commit is contained in:
Jenkins 2015-04-24 00:59:29 +00:00 committed by Gerrit Code Review
commit 05d1fee6ec

View File

@ -59,10 +59,17 @@ if [[ ! -d applytest ]] ; then
mkdir applytest
fi
csplit -sf applytest/puppetapplytest manifests/site.pp '/^$/' {*}
sed -i -e 's/^[^][:space:]$]/#&/g' applytest/puppetapplytest*
sed -i -e 's@hiera(.\([^.]*\).,\([^)]*\))@\2@' applytest/puppetapplytest*
mv applytest/*00 applytest/head # These are the top-level variables defined in site.pp
# First split the variables at the beginning of the file
csplit -sf applytest/prep manifests/site.pp '/^$/' {0}
# Then split the class defs.
csplit -sf applytest/puppetapplytest applytest/prep01 '/^}$/' {*}
# Remove } header left by csplit
sed -i -e '/^\}$/d' applytest/puppetapplytest*
# Comment out anything that doesn't begin with a space.
# This gives us the node {} internal contents.
sed -i -e 's/^[^][:space:]$]/#&/g' applytest/prep00 applytest/puppetapplytest*
sed -i -e 's@hiera(.\([^.]*\).,\([^)]*\))@\2@' applytest/prep00 applytest/puppetapplytest*
mv applytest/prep00 applytest/head # These are the top-level variables defined in site.pp
if [[ `lsb_release -i -s` == 'CentOS' ]]; then
if [[ `lsb_release -r -s` =~ '6' ]]; then