From efc85a4e625efff8735d3d42dfb7025e48560496 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Mon, 7 Jul 2014 17:20:34 -0700 Subject: [PATCH] Add extra [] to puppet apply test Double [[]] are needed by bash for the regex operator. Use them universally for safety. And make gate-config-puppet-apply-centos6 voting. Change-Id: I8f245a86381d24d8938df444e0268343b46fe09f --- modules/openstack_project/files/zuul/layout.yaml | 2 -- test.sh | 10 +++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index add12cc2a7..9d0f1935d0 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -656,8 +656,6 @@ jobs: voting: false - name: gate-puppet-vswitch-puppet-syntax voting: false - - name: gate-config-puppet-apply-centos6 - voting: false - name: gate-tomograph-python33 voting: false - name: check-rally-dsvm-cli diff --git a/test.sh b/test.sh index c8e2e67163..15571347db 100755 --- a/test.sh +++ b/test.sh @@ -3,7 +3,7 @@ ROOT=$(readlink -fn $(dirname $0)) MODULE_PATH="${ROOT}/modules:/etc/puppet/modules" -if [ ! -d applytest ] ; then +if [[ ! -d applytest ]] ; then mkdir applytest fi @@ -12,11 +12,11 @@ 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 -if [ `lsb_release -i -s` == 'CentOS' ]; then - if [ `lsb_release -r -s` =~ '6' ]; then +if [[ `lsb_release -i -s` == 'CentOS' ]]; then + if [[ `lsb_release -r -s` =~ '6' ]]; then CODENAME='centos6' fi -elif [ `lsb_release -i -s` == 'Ubuntu' ]; then +elif [[ `lsb_release -i -s` == 'Ubuntu' ]]; then CODENAME=`lsb_release -c -s` fi @@ -28,7 +28,7 @@ for f in `find applytest -name 'puppetapplytest*' -print` ; do fi done -if [ $FOUND == "0" ]; then +if [[ $FOUND == "0" ]]; then echo "No hosts found for node type $CODENAME" exit 1 fi