aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-05-07 13:17:17 -0700
committerJunio C Hamano <gitster@pobox.com>2012-05-07 13:17:17 -0700
commit6a88021e4675b69b927ce1aa9c4dddc5dc621232 (patch)
treef5d564c698d87857c31909c714df3a67365c06b0 /t
parent4c8ad06e7c20741c7330ff791e06ef20142c91e4 (diff)
parent46e358158109200abde4de0a044a415c80c9bce5 (diff)
downloadgit-6a88021e4675b69b927ce1aa9c4dddc5dc621232.tar.gz
git-6a88021e4675b69b927ce1aa9c4dddc5dc621232.tar.xz
Merge branch 'js/daemon-test-race-fix' into maint
The test scaffolding for git-daemon was flaky. By Johannes Sixt * js/daemon-test-race-fix: t5570: fix forwarding of git-daemon messages via cat
Diffstat (limited to 't')
-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 ef2d01f36..87f0ad8f4 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() {