From 096b74896aea2ca082398dd1f4b711de5cb0b9b4 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 9 Jul 2014 16:22:53 -0700 Subject: [PATCH] Make /var/run/puppet in apply test So that pupet doesn't try to do it on its own (parallel processes could be racy). Also, make grep quiet when searching for nodes to apply. Change-Id: I5012278cfd98c7e3d39ca75794ce97366289d7a1 --- test.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 15571347db..891852100c 100755 --- a/test.sh +++ b/test.sh @@ -22,7 +22,7 @@ fi FOUND=0 for f in `find applytest -name 'puppetapplytest*' -print` ; do - if grep "Node-OS: $CODENAME" $f; then + if grep -q "Node-OS: $CODENAME" $f; then cat applytest/head $f > $f.final FOUND=1 fi @@ -38,6 +38,7 @@ HOST=`echo $HOSTNAME |awk -F. '{ print $1 }'` echo "127.0.1.1 $HOST.openstack.org $HOST" >> /tmp/hosts sudo mv /tmp/hosts /etc/hosts +sudo mkdir -p /var/run/puppet find applytest -name 'puppetapplytest*.final' -print0 | \ xargs -0 -P $(nproc) -n 1 -I filearg \ sudo puppet apply --modulepath=${MODULE_PATH} --noop --verbose --debug filearg > /dev/null