Bug 1135399 - Timeout shell builds, r=catlee

This commit is contained in:
Steve Fink 2015-03-18 10:59:17 -07:00
parent 2b50afd362
commit 5ad1c2ac99

View File

@ -12,6 +12,7 @@ function usage() {
clean=""
platform=""
TIMEOUT=7200
while [ $# -gt 1 ]; do
case "$1" in
--clobber)
@ -23,6 +24,11 @@ while [ $# -gt 1 ]; do
platform="$1"
shift
;;
--timeout)
shift
TIMEOUT="$1"
shift
;;
*)
echo "Invalid arguments" >&2
usage
@ -130,6 +136,12 @@ fi
RUN_JSTESTS=true
PARENT=$$
sh -c "sleep $TIMEOUT; kill $PARENT" <&- >&- 2>&- &
KILLER=$!
disown %1
trap "kill $KILLER" EXIT
if [[ "$VARIANT" = "rootanalysis" ]]; then
export JS_GC_ZEAL=7