summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-04-29 17:52:02 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-04-29 17:52:03 -0700
commita75aba4a5306d0fee6a8ee8b48943e2c19eb2750 (patch)
tree1c025323d5104e7621b4abb040806cc805c12a52
parentMerge branch 'kk/gitweb-omit-expensive' (diff)
parentt5570: fix forwarding of git-daemon messages via cat (diff)
downloadtgif-a75aba4a5306d0fee6a8ee8b48943e2c19eb2750.tar.xz
Merge branch 'js/daemon-test-race-fix'
The shell construct to launch git-daemon and wait for it to start serving during the test was faulty, and this fixes it. By Johannes Sixt * js/daemon-test-race-fix: t5570: fix forwarding of git-daemon messages via cat
-rw-r--r--t/lib-git-daemon.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/t/lib-git-daemon.sh b/t/lib-git-daemon.sh
index ef2d01f369..87f0ad8f41 100644
--- a/t/lib-git-daemon.sh
+++ b/t/lib-git-daemon.sh
@@ -31,19 +31,19 @@ start_git_daemon() {
>&3 2>git_daemon_output &
GIT_DAEMON_PID=$!
{
- read line
+ read line <&7
echo >&4 "$line"
- cat >&4 &
+ cat <&7 >&4 &
+ } 7<git_daemon_output &&
- # Check expected output
- if test x"$(expr "$line" : "\[[0-9]*\] \(.*\)")" != x"Ready to rumble"
- then
- kill "$GIT_DAEMON_PID"
- wait "$GIT_DAEMON_PID"
- trap 'die' EXIT
- error "git daemon failed to start"
- fi
- } <git_daemon_output
+ # Check expected output
+ if test x"$(expr "$line" : "\[[0-9]*\] \(.*\)")" != x"Ready to rumble"
+ then
+ kill "$GIT_DAEMON_PID"
+ wait "$GIT_DAEMON_PID"
+ trap 'die' EXIT
+ error "git daemon failed to start"
+ fi
}
stop_git_daemon() {