diff --git a/tests/launch_tests.sh b/tests/launch_tests.sh index 326d239..5793841 100755 --- a/tests/launch_tests.sh +++ b/tests/launch_tests.sh @@ -26,6 +26,7 @@ tests_list="" testno=0 testcount=0 +dismiss_test=0 dismiss_count=0 nbfailedret=0 nbfailedgrep=0 @@ -71,6 +72,7 @@ clear_registered_tests() { unset REGISTERED_TESTS declare -a REGISTERED_TESTS dismiss_count=0 + dismiss_test=0 } # Generates a formated test name @@ -84,6 +86,9 @@ make_usecase_name() { # Plays the registered test suite play_registered_tests() { + if [ "$dismiss_test" -eq 1 ]; then + return + fi usecase_name=$1 if [[ "${REGISTERED_TESTS[*]}" ]]; then export numtest=${#REGISTERED_TESTS[@]} diff --git a/tests/lib.sh b/tests/lib.sh index 32b9e42..ac07c71 100644 --- a/tests/lib.sh +++ b/tests/lib.sh @@ -66,6 +66,10 @@ contain() fi } +dismiss_test() { + dismiss_test=1 +} + # test is expected to fail (for instance on blank system) # then the test wont be taken into account for test suite success dismiss_count_for_test() {