Allow for the integration test to be run in -strict mode, exiting the execution in case errors were found

This commit is contained in:
Pim van Pelt
2022-04-10 15:06:37 +00:00
parent 0116583463
commit 72668bdb18

View File

@ -7,11 +7,13 @@
## here should not be used although they can be a source of config inspiration :) ## here should not be used although they can be a source of config inspiration :)
## Run me: ## Run me:
# ./intest.sh 2>&1 | tee intest.out # ./intest.sh -strict 2>&1 | tee intest.out
rm -f "intest.exec" rm -f "intest.exec"
STRICT=0
[ $# -ge 1 -a "$1" = "-strict" ] && STRICT=1
for i in hippo[0-9]*.yaml; do for i in hippo[0-9]*.yaml; do
echo "Clearing: Moving to hippo-empty.yaml" echo "Clearing: Moving to hippo-empty.yaml"
../vppcfg plan -s ../schema.yaml -c hippo-empty.yaml -o /tmp/vppcfg-exec-empty ../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 ] && { [ -s /tmp/vppcfg-exec_${j}_${j}_null ] && {
echo " - ERROR Transition is not empty" echo " - ERROR Transition is not empty"
cat /tmp/vppcfg-exec_${j}_${j}_null cat /tmp/vppcfg-exec_${j}_${j}_null
exit 1 [ $STRICT -ne 0 ] && exit 1
} }
done done
done done
exit 0