2005-11-17 James A. Morrison <phython@gcc.gnu.org>
Michael Chamberlain <michael@chamberlain.net.au>
* ada/acats/run_all.sh (target_run): Kill long running tests.
Co-Authored-By: Michael Chamberlain <michael@chamberlain.net.au>
From-SVN: r107161
+2005-11-17 James A. Morrison <phython@gcc.gnu.org>
+ Michael Chamberlain <michael@chamberlain.net.au>
+
+ * ada/acats/run_all.sh (target_run): Kill long running tests.
+
2005-11-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* gcc.dg/cleanup-8.c: Enable test on hppa*-*-hpux*.
gccflags="-O2"
gnatflags="-gnatws"
+if [ "x$DEJAGNU_TIMEOUT" != "x" ]; then
+ timeout=$DEJAGNU_TIMEOUT
+else
+ timeout=300
+fi
+
target_run () {
-$*
+ sh -c "
+ (sleep $timeout && kill 2>/dev/null \$\$) &
+ watchdog=\$!
+ ($*) &
+ child=\$!
+ trap \"kill 2>/dev/null \$child\" 0 1
+ wait \$child
+ status=\$?
+ trap \"\" 0 1
+ kill 2>/dev/null \$watchdog
+ exit \$status
+ "
}
# End of customization section.