mirror of git://gcc.gnu.org/git/gcc.git
gotest: Add external timeout if internal timeout fails.
From-SVN: r172003
This commit is contained in:
parent
bc8e4748aa
commit
49fd1b338c
|
@ -377,7 +377,20 @@ case "x$dejagnu" in
|
||||||
xno)
|
xno)
|
||||||
${GC} -g -c _testmain.go
|
${GC} -g -c _testmain.go
|
||||||
${GL} *.o ${GOLIBS}
|
${GL} *.o ${GOLIBS}
|
||||||
./a.out -test.short -test.timeout=$timeout "$@"
|
|
||||||
|
./a.out -test.short -test.timeout=$timeout "$@" &
|
||||||
|
pid=$!
|
||||||
|
(sleep `expr $timeout + 10`
|
||||||
|
echo > gotest-timeout
|
||||||
|
echo "timed out in gotest" 1>&2
|
||||||
|
kill -9 $pid) &
|
||||||
|
alarmpid=$!
|
||||||
|
wait $pid
|
||||||
|
status=$?
|
||||||
|
if ! test -f gotest-timeout; then
|
||||||
|
kill $alarmpid
|
||||||
|
fi
|
||||||
|
exit $status
|
||||||
;;
|
;;
|
||||||
xyes)
|
xyes)
|
||||||
rm -rf ../testsuite/*.o
|
rm -rf ../testsuite/*.o
|
||||||
|
|
Loading…
Reference in New Issue