File tree Expand file tree Collapse file tree 3 files changed +0
-51
lines changed Expand file tree Collapse file tree 3 files changed +0
-51
lines changed Original file line number Diff line number Diff line change @@ -825,24 +825,6 @@ test_expect_success 'tests clean up even on failures' "
825
825
EOF
826
826
"
827
827
828
- test_expect_success ' test_atexit is run' "
829
- test_must_fail run_sub_test_lib_test \
830
- atexit-cleanup 'Run atexit commands' -i <<-\\ EOF &&
831
- test_expect_success 'tests clean up even after a failure' '
832
- > ../../clean-atexit &&
833
- test_atexit rm ../../clean-atexit &&
834
- > ../../also-clean-atexit &&
835
- test_atexit rm ../../also-clean-atexit &&
836
- > ../../dont-clean-atexit &&
837
- (exit 1)
838
- '
839
- test_done
840
- EOF
841
- test_path_exists dont-clean-atexit &&
842
- test_path_is_missing clean-atexit &&
843
- test_path_is_missing also-clean-atexit
844
- "
845
-
846
828
test_expect_success ' test_oid setup' '
847
829
test_oid_init
848
830
'
Original file line number Diff line number Diff line change @@ -927,35 +927,6 @@ test_when_finished () {
927
927
} && (exit \"\$ eval_ret\" ); eval_ret=\$ ?; $test_cleanup "
928
928
}
929
929
930
- # This function can be used to schedule some commands to be run
931
- # unconditionally at the end of the test script, e.g. to stop a daemon:
932
- #
933
- # test_expect_success 'test git daemon' '
934
- # git daemon &
935
- # daemon_pid=$! &&
936
- # test_atexit "kill $daemon_pid" &&
937
- # hello world
938
- # '
939
-
940
- test_atexit () {
941
- # We cannot detect when we are in a subshell in general, but by
942
- # doing so on Bash is better than nothing (the test will
943
- # silently pass on other shells).
944
- test " ${BASH_SUBSHELL-0} " = 0 ||
945
- error " bug in test script: test_atexit does nothing in a subshell"
946
- test_atexit_cleanup=" { $*
947
- } && (exit \"\$ eval_ret\" ); eval_ret=\$ ?; $test_atexit_cleanup "
948
- }
949
-
950
- test_atexit_handler () {
951
- test : ! = " $test_atexit_cleanup " || return 0
952
-
953
- setup_malloc_check
954
- test_eval_ " $test_atexit_cleanup "
955
- test_atexit_cleanup=:
956
- teardown_malloc_check
957
- }
958
-
959
930
# Most tests can use the created repository, but some may need to create more.
960
931
# Usage: test_create_repo <directory>
961
932
test_create_repo () {
Original file line number Diff line number Diff line change @@ -481,7 +481,6 @@ test_external_has_tap=0
481
481
482
482
die () {
483
483
code=$?
484
- test_atexit_handler || code=$?
485
484
if test -n " $GIT_EXIT_OK "
486
485
then
487
486
exit $code
@@ -931,12 +930,9 @@ write_junit_xml_testcase () {
931
930
junit_have_testcase=t
932
931
}
933
932
934
- test_atexit_cleanup=:
935
933
test_done () {
936
934
GIT_EXIT_OK=t
937
935
938
- test -n " $immediate " || test_atexit_handler
939
-
940
936
if test -n " $write_junit_xml " && test -n " $junit_xml_path "
941
937
then
942
938
test -n " $junit_have_testcase " || {
You can’t perform that action at this time.
0 commit comments