mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 00:06:09 +03:00
Add a timeout limit in tests
This commit is contained in:
parent
7348efb531
commit
b48a0cea73
@ -47,7 +47,16 @@ test_naive() {
|
||||
name=naive$(echo "$arg" | tr -c 0-9a-z _)
|
||||
$naive $arg 2>$name.log & pid="$pid $!"
|
||||
tail -f $name.log & pid="$pid $!"
|
||||
while ! grep -q 'Listening on' $name.log; do sleep 1; done
|
||||
for i in $(seq 10); do
|
||||
if grep -q 'Listening on' $name.log; then
|
||||
break
|
||||
fi
|
||||
if [ $i -eq 10 ]; then
|
||||
echo Timeout to start naive
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
done
|
||||
test_proxy "$proxy"
|
||||
); then
|
||||
|
Loading…
Reference in New Issue
Block a user