From 72668bdb1874651e8b0090268ec0d562142c681f Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Sun, 10 Apr 2022 15:06:37 +0000 Subject: [PATCH] Allow for the integration test to be run in -strict mode, exiting the execution in case errors were found --- intest/intest.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/intest/intest.sh b/intest/intest.sh index 54afed3..a617fce 100755 --- a/intest/intest.sh +++ b/intest/intest.sh @@ -7,11 +7,13 @@ ## here should not be used although they can be a source of config inspiration :) ## Run me: -# ./intest.sh 2>&1 | tee intest.out - +# ./intest.sh -strict 2>&1 | tee intest.out rm -f "intest.exec" +STRICT=0 +[ $# -ge 1 -a "$1" = "-strict" ] && STRICT=1 + for i in hippo[0-9]*.yaml; do echo "Clearing: Moving to hippo-empty.yaml" ../vppcfg plan -s ../schema.yaml -c hippo-empty.yaml -o /tmp/vppcfg-exec-empty @@ -39,7 +41,9 @@ for i in hippo[0-9]*.yaml; do [ -s /tmp/vppcfg-exec_${j}_${j}_null ] && { echo " - ERROR Transition is not empty" cat /tmp/vppcfg-exec_${j}_${j}_null - exit 1 + [ $STRICT -ne 0 ] && exit 1 } done done + +exit 0