diff options
author | Thomas Haller <thaller@redhat.com> | 2023-09-06 13:52:11 +0200 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2023-09-07 19:35:20 +0200 |
commit | df43636341a5bff84e22663552e5ccd53e88a51c (patch) | |
tree | 771ab1a3c25aedbb0c06ed709c815358f29cc04a /tests/shell/run-tests.sh | |
parent | ae54726dbfe83f07ba5d6e72d2f101b6475fbd97 (diff) |
tests/shell: interpret an exit code of 77 from scripts as "skipped"
Allow scripts to indicate that a test could not run by exiting 77.
"77" is chosen as exit code from automake's testsuites ([1]). Compare to
git-bisect which chooses 125 to indicate skipped.
[1] https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
Signed-off-by: Thomas Haller <thaller@redhat.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'tests/shell/run-tests.sh')
-rwxr-xr-x | tests/shell/run-tests.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh index f083773c..fec9e774 100755 --- a/tests/shell/run-tests.sh +++ b/tests/shell/run-tests.sh @@ -323,6 +323,7 @@ fi echo "" ok=0 +skipped=0 failed=0 taint=0 @@ -423,6 +424,14 @@ for testfile in "${TESTS[@]}" ; do msg_warn "[DUMP FAIL] $testfile" fi fi + elif [ "$rc_got" -eq 77 ] ; then + ((skipped++)) + if [ "$VERBOSE" == "y" ] ; then + msg_warn "[SKIPPED] $testfile" + [ ! -z "$test_output" ] && echo "$test_output" + else + msg_warn "[SKIPPED] $testfile" + fi else ((failed++)) if [ "$VERBOSE" == "y" ] ; then @@ -447,7 +456,7 @@ echo "" kmemleak_found=0 check_kmemleak_force -msg_info "results: [OK] $ok [FAILED] $failed [TOTAL] $((ok+failed))" +msg_info "results: [OK] $ok [SKIPPED] $skipped [FAILED] $failed [TOTAL] $((ok+skipped+failed))" kernel_cleanup |