diff options
author | Thomas Haller <thaller@redhat.com> | 2022-02-03 22:23:44 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-02-09 19:13:02 +0100 |
commit | f65747f6e9edc4a6d01d8825e6c6bc3da284c6b9 (patch) | |
tree | 8d8e996129b9be4549a37f0227f50ccfe38c2545 | |
parent | a1abb3ebdfca0cea16c8649031c9b1b09387b441 (diff) |
tests: let "run-nm-test.sh" fail with exit code 1 on failure
`git bisect run` is peculiar about the exit code:
error: bisect run failed: exit code 134 from '...' is < 0 or >= 128
If we just "exec" the test, it usually will fail on an assert. That results
in SIGABRT or exit code 134. So out of the box that is annoying with
git-bisect.
Work around that and let the test wrapper always coerce any test failure
to exit code 1.
-rwxr-xr-x | tools/run-nm-test.sh | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/run-nm-test.sh b/tools/run-nm-test.sh index b1d3dd939a..59a489332a 100755 --- a/tools/run-nm-test.sh +++ b/tools/run-nm-test.sh @@ -300,9 +300,10 @@ fi if ! _is_true "$NMTST_USE_VALGRIND" 0; then export NM_TEST_UNDER_VALGRIND=0 - exec "${NMTST_DBUS_RUN_SESSION[@]}" \ - "$TEST" "${TEST_ARGV[@]}" - die "exec \"$TEST\" failed" + "${NMTST_DBUS_RUN_SESSION[@]}" "$TEST" "${TEST_ARGV[@]}" + r=$? + [ $r == 0 ] || die "exec \"$TEST\" failed with exit code $r" + exit 0 fi if [[ -z "${NMTST_VALGRIND}" ]]; then |