Skip to content

Commit 9f65947

Browse files
committed
t5570: make test "set -e" clean
In order to catch mistakes like misspelling "test_expect_success", we would like to eventually be able to run our test suite with the "-e" option on. Among a few scripts that use lib-git-daemon.sh, t5570 starts and stops git-daemon process multiple times. Make stop_git_daemon function "set -e" clean. Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 302c2d6 commit 9f65947

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

t/lib-git-daemon.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,13 @@ stop_git_daemon() {
8686
# kill git-daemon child of git
8787
say >&3 "Stopping git daemon ..."
8888
kill "$GIT_DAEMON_PID"
89-
wait "$GIT_DAEMON_PID" >&3 2>&4
90-
ret=$?
89+
ret=0
90+
wait "$GIT_DAEMON_PID" >&3 2>&4 || ret=$?
9191
if ! test_match_signal 15 $ret
9292
then
9393
error "git daemon exited with status: $ret"
9494
fi
95-
kill "$(cat "$GIT_DAEMON_PIDFILE")" 2>/dev/null
95+
kill "$(cat "$GIT_DAEMON_PIDFILE")" 2>/dev/null || :
9696
GIT_DAEMON_PID=
9797
rm -f git_daemon_output "$GIT_DAEMON_PIDFILE"
9898
}

0 commit comments

Comments
 (0)