mirror of
https://github.com/git/git.git
synced 2026-01-18 14:44:28 +00:00
git-daemon: use test_atexit in the tests
This makes use of the just-introduced consistent way to specify that a long-running process needs to be terminated at the end of a test script run. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
@@ -37,5 +37,4 @@ test_expect_success "fetch with $VERSION_B" '
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
stop_git_daemon
|
||||
test_done
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
#
|
||||
# test_expect_success ...
|
||||
#
|
||||
# stop_git_daemon
|
||||
# test_done
|
||||
|
||||
test_tristate GIT_TEST_GIT_DAEMON
|
||||
@@ -43,7 +42,7 @@ start_git_daemon() {
|
||||
|
||||
mkdir -p "$GIT_DAEMON_DOCUMENT_ROOT_PATH"
|
||||
|
||||
trap 'code=$?; stop_git_daemon; (exit $code); die' EXIT
|
||||
test_atexit 'stop_git_daemon'
|
||||
|
||||
say >&3 "Starting git daemon ..."
|
||||
mkfifo git_daemon_output
|
||||
|
||||
@@ -211,5 +211,4 @@ test_expect_success FAKENC 'hostname interpolation works after LF-stripping' '
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
stop_git_daemon
|
||||
test_done
|
||||
|
||||
Reference in New Issue
Block a user