[PATCH v2 02/14] test-lib: don't set GIT_EXIT_OK before calling test_atexit_handler
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jul 20, 2022, 21:21 UTC
- Message-ID
- <patch-v2-02.14-00af775bd0d-20220720T211221Z-avarab@gmail.com>
- In-Reply-To
- <cover-v2-00.14-00000000000-20220720T211221Z-avarab@gmail.com>
Change the control flow in test_done so that we'll set GIT_EXIT_OK=t after we call test_atexit_handler(). This seems to have been a mistake in 900721e15c4 (test-lib: introduce 'test_atexit', 2019-03-13). It doesn't make sense to allow our "atexit" handling to call "exit" without us emitting the errors we'll emit without GIT_EXIT_OK=t being set.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- t/test-lib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/test-lib.sh b/t/test-lib.sh index 3f11ce35112..c8c84ef9b14 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -1169,12 +1169,12 @@ test_atexit_handler () { } test_done () { - GIT_EXIT_OK=t - # Run the atexit commands _before_ the trash directory is # removed, so the commands can access pidfiles and socket files. test_atexit_handler + GIT_EXIT_OK=t + finalize_test_output if test -z "$HARNESS_ACTIVE"
-- 2.37.1.1064.gc96144cf387