Skip to content
/ git Public
forked from git/git

Commit

Permalink
Merge branch 'js/daemon-test-race-fix'
Browse files Browse the repository at this point in the history
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
  • Loading branch information
gitster committed Apr 30, 2012
2 parents 55375e9 + 46e3581 commit a75aba4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions t/lib-git-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit a75aba4

Please sign in to comment.