From ecc9c3a0575400518f4f9cfaee58557e9fcef9b5 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 9 Jun 2017 16:08:45 +0200 Subject: [PATCH] tests: allow skipping of tests by using return code 99 --- tests/integration-tests.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tests/integration-tests.sh b/tests/integration-tests.sh index 68af21a6f..b6f30ecc7 100755 --- a/tests/integration-tests.sh +++ b/tests/integration-tests.sh @@ -78,13 +78,20 @@ for TEST in ${TESTS}; do RC=$? - if (( $RC != 0 )); then - echo -e "\e[31m[Fail] \e[39m ${TESTNAME} with code $RC" - NUM_FAIL=$((${NUM_FAIL} + 1)) - else - echo -e "\e[32m[Pass] \e[39m ${TESTNAME}" - NUM_PASS=$((${NUM_PASS} + 1)) - fi + case $RC in + 0) + echo -e "\e[32m[Pass] \e[39m ${TESTNAME}" + NUM_PASS=$((${NUM_PASS} + 1)) + ;; + 99) + echo -e "\e[93m[Skip] \e[39m ${TESTNAME}" + NUM_SKIP=$((${NUM_SKIP} + 1)) + ;; + *) + echo -e "\e[31m[Fail] \e[39m ${TESTNAME} with code $RC" + NUM_FAIL=$((${NUM_FAIL} + 1)) + ;; + esac done # Show summary