Bug 1135399 - Timeout shell builds, r=catlee
authorSteve Fink <sfink@mozilla.com>
Wed, 18 Mar 2015 10:59:17 -0700
changeset 264633 127f581e47ea833d1c69db2b733880d772b2d9e9
parent 264632 07dc430fc6a0fefc4d400be0eecd379549f79cf6
child 264634 d907db0b4590a238d336a2e3919f23552a7c4248
push id4718
push userraliiev@mozilla.com
push dateMon, 11 May 2015 18:39:53 +0000
treeherdermozilla-beta@c20c4ef55f08 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscatlee
bugs1135399
milestone39.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1135399 - Timeout shell builds, r=catlee
js/src/devtools/automation/autospider.sh
--- a/js/src/devtools/automation/autospider.sh
+++ b/js/src/devtools/automation/autospider.sh
@@ -7,27 +7,33 @@ ABSDIR="$(cd $DIR; pwd)"
 SOURCE="$(cd $DIR/../../../..; pwd)"
 
 function usage() {
   echo "Usage: $0 [--dep] <variant>"
 }
 
 clean=""
 platform=""
+TIMEOUT=7200
 while [ $# -gt 1 ]; do
     case "$1" in
         --clobber)
             shift
             clean=1
             ;;
         --platform)
             shift
             platform="$1"
             shift
             ;;
+        --timeout)
+            shift
+            TIMEOUT="$1"
+            shift
+            ;;
         *)
             echo "Invalid arguments" >&2
             usage
             exit 1
             ;;
     esac
 done
 
@@ -125,16 +131,22 @@ COMMAND_PREFIX=''
 
 # On Linux, disable ASLR to make shell builds a bit more reproducible.
 if type setarch >/dev/null 2>&1; then
     COMMAND_PREFIX="setarch $(uname -m) -R "
 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
 
 elif [[ "$VARIANT" = "compacting" ]]; then
     export JS_GC_ZEAL=14
 
     # Ignore timeouts from tests that are known to take too long with this zeal mode
     export JITTEST_EXTRA_ARGS=--ignore-timeouts=$ABSDIR/cgc-jittest-timeouts.txt