test-lib: don't set GIT_EXIT_OK before calling test_atexit_handler

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> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Jul 28, 2022 at 01:13 UTC e0258f15cbe1412659a0a68ac17b42dd470a49fb
1 file changed +2 -2
t/test-lib.sh
+2 -2
@@ -1169,12 +1169,12 @@ test_atexit_handler () {
1169 }
1170
1171 test_done () {
1172 - GIT_EXIT_OK=t
1173 -
1172 # Run the atexit commands _before_ the trash directory is
1173 # removed, so the commands can access pidfiles and socket files.
1174 test_atexit_handler
1175
1176 + GIT_EXIT_OK=t
1177 +
1178 finalize_test_output
1179
1180 if test -z "$HARNESS_ACTIVE"