tests/installed: Wait a bit more for http.server
And also print out the output if it still didn't start up in case there are error messages hidden in there. This should hopefully help with diagnosing the flakes we've been seeing in starting it up. Closes: #1652 Approved by: cgwalters
This commit is contained in:
parent
087ad1167a
commit
8dff04601b
|
|
@ -58,7 +58,8 @@ run_tmp_webserver() {
|
||||||
cd -
|
cd -
|
||||||
child_pid=$!
|
child_pid=$!
|
||||||
|
|
||||||
for x in $(seq 10); do
|
for x in $(seq 60); do
|
||||||
|
echo "Waiting for web server ($x/60)..." >&2
|
||||||
# Snapshot the output
|
# Snapshot the output
|
||||||
cp ${test_tmpdir}/httpd-output{,.tmp}
|
cp ${test_tmpdir}/httpd-output{,.tmp}
|
||||||
# If it's non-empty, see whether it matches our regexp
|
# If it's non-empty, see whether it matches our regexp
|
||||||
|
|
@ -71,6 +72,12 @@ run_tmp_webserver() {
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ ! -f ${test_tmpdir}/httpd-port ]; then
|
||||||
|
cat ${test_tmpdir}/httpd-output
|
||||||
|
fatal "can't start up httpd"
|
||||||
|
fi
|
||||||
|
|
||||||
port=$(cat ${test_tmpdir}/httpd-port)
|
port=$(cat ${test_tmpdir}/httpd-port)
|
||||||
echo "http://127.0.0.1:${port}" > ${test_tmpdir}/httpd-address
|
echo "http://127.0.0.1:${port}" > ${test_tmpdir}/httpd-address
|
||||||
echo "$child_pid" > ${test_tmpdir}/httpd-pid
|
echo "$child_pid" > ${test_tmpdir}/httpd-pid
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue