From 6a1d4da730885a6d4e2c1417e82d41dd06a62da1 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Mon, 15 Apr 2019 11:40:28 +1000 Subject: [PATCH] Add Puppet-Version: !X skip to apply tests Setting Puppet-Version: !X (where X would usually be 3) marks a hosts as not wanting to run the apply tests for that puppet version. This is helpful for puppet4 hosts that wish to bring in new modules that are not puppet3 compatible. Change-Id: I081d15a53bd85152e7729c4c1da094dfee6d7073 --- tools/apply-test.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/apply-test.sh b/tools/apply-test.sh index 09cf7562c5..3e6e376494 100755 --- a/tools/apply-test.sh +++ b/tools/apply-test.sh @@ -49,8 +49,13 @@ fi FOUND=0 for f in `find applytest -name 'puppetapplytest*' -print` ; do if grep -q "Node-OS: $CODENAME" $f; then - cat applytest/head $f > $f.final - FOUND=1 + if grep -q "Puppet-Version: !${PUPPET_VERSION}" $f; then + echo "Skipping $f due to unsupported puppet version" + continue + else + cat applytest/head $f > $f.final + FOUND=1 + fi fi done