diff options
| -rw-r--r-- | t/test-lib-functions.sh | 3 | ||||
| -rw-r--r-- | t/test-lib.sh | 11 |
2 files changed, 8 insertions, 6 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index fde9bf54fc..78e054ab50 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -926,7 +926,8 @@ test_expect_success () { test_body_or_stdin test_body "$2" test -n "$test_skip_test_preamble" || say >&3 "expecting success of $TEST_NUMBER.$test_count '$1': $test_body" - if test_run_ "$test_body" + if test_run_ "$test_body" && + check_test_results_san_file_empty_ then test_ok_ "$1" else diff --git a/t/test-lib.sh b/t/test-lib.sh index d624ee186c..b1a8ee5c00 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1215,12 +1215,13 @@ test_atexit_handler () { teardown_malloc_check } +check_test_results_san_file_empty_ () { + test -z "$TEST_RESULTS_SAN_FILE" || + test "$(nr_san_dir_leaks_)" = 0 +} + check_test_results_san_file_ () { - if test -z "$TEST_RESULTS_SAN_FILE" - then - return - fi && - if test "$(nr_san_dir_leaks_)" = 0 + if check_test_results_san_file_empty_ then return fi && |
