diff options
-rw-r--r-- | t/test-lib.sh | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index 4e79e140c9..ab3de007e2 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -631,7 +631,10 @@ die () { GIT_EXIT_OK= trap 'die' EXIT -trap 'exit $?' INT TERM HUP +# Disable '-x' tracing, because with some shells, notably dash, it +# prevents running the cleanup commands when a test script run with +# '--verbose-log -x' is interrupted. +trap '{ code=$?; set +x; } 2>/dev/null; exit $code' INT TERM HUP # The user-facing functions are loaded from a separate file so that # test_perf subshells can have them too |