Skip to content

Commit e0258f1

Browse files
avargitster
authored andcommitted
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 900721e (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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6d00680 commit e0258f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

t/test-lib.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,12 +1169,12 @@ test_atexit_handler () {
11691169
}
11701170

11711171
test_done () {
1172-
GIT_EXIT_OK=t
1173-
11741172
# Run the atexit commands _before_ the trash directory is
11751173
# removed, so the commands can access pidfiles and socket files.
11761174
test_atexit_handler
11771175

1176+
GIT_EXIT_OK=t
1177+
11781178
finalize_test_output
11791179

11801180
if test -z "$HARNESS_ACTIVE"

0 commit comments

Comments
 (0)