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
This commit is contained in:
@ -31,19 +31,19 @@ start_git_daemon() {
|
|||||||
>&3 2>git_daemon_output &
|
>&3 2>git_daemon_output &
|
||||||
GIT_DAEMON_PID=$!
|
GIT_DAEMON_PID=$!
|
||||||
{
|
{
|
||||||
read line
|
read line <&7
|
||||||
echo >&4 "$line"
|
echo >&4 "$line"
|
||||||
cat >&4 &
|
cat <&7 >&4 &
|
||||||
|
} 7<git_daemon_output &&
|
||||||
|
|
||||||
# Check expected output
|
# Check expected output
|
||||||
if test x"$(expr "$line" : "\[[0-9]*\] \(.*\)")" != x"Ready to rumble"
|
if test x"$(expr "$line" : "\[[0-9]*\] \(.*\)")" != x"Ready to rumble"
|
||||||
then
|
then
|
||||||
kill "$GIT_DAEMON_PID"
|
kill "$GIT_DAEMON_PID"
|
||||||
wait "$GIT_DAEMON_PID"
|
wait "$GIT_DAEMON_PID"
|
||||||
trap 'die' EXIT
|
trap 'die' EXIT
|
||||||
error "git daemon failed to start"
|
error "git daemon failed to start"
|
||||||
fi
|
fi
|
||||||
} <git_daemon_output
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_git_daemon() {
|
stop_git_daemon() {
|
||||||
|
Reference in New Issue
Block a user