Bug 1290459 - port changes from bug 1285582 to test-ubuntu1604.sh. r=ahal
authorJoel Maher <jmaher@mozilla.com>
Fri, 29 Jul 2016 14:56:31 -0400
changeset 347460 d7ec7fcb18432a580e7a1581115d9e532e894a29
parent 347459 3252e497b11121619545351a731f9b24885d5028
child 347461 aaf6318572b6a00e6d484bfabe2f4912588d46bf
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1290459, 1285582
milestone50.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 1290459 - port changes from bug 1285582 to test-ubuntu1604.sh. r=ahal MozReview-Commit-ID: L5HjOIesJCQ
taskcluster/scripts/tester/test-ubuntu1204.sh
taskcluster/scripts/tester/test-ubuntu1604.sh
--- a/taskcluster/scripts/tester/test-ubuntu1204.sh
+++ b/taskcluster/scripts/tester/test-ubuntu1204.sh
@@ -39,17 +39,17 @@ mkdir -p ~/artifacts/public
 
 cleanup() {
     local rv=$?
     if [[ -s /home/worker/.xsession-errors ]]; then
       # To share X issues
       cp /home/worker/.xsession-errors ~/artifacts/public/xsession-errors.log
     fi
     # When you call this script with START_VNC or TASKCLUSTER_INTERACTIVE
-    # we make sure we don't kill xvfb so you don't lose your connection
+    # we make sure we do not kill xvfb so you do not lose your connection
     xvfb_pid=`pidof Xvfb`
     if [ -n "$xvfb_pid" ] && [ $START_VNC == false ] && [ $TASKCLUSTER_INTERACTIVE == false ] ; then
         kill $xvfb_pid || true
         screen -XS xvfb quit || true
     fi
     exit $rv
 }
 trap cleanup EXIT INT
--- a/taskcluster/scripts/tester/test-ubuntu1604.sh
+++ b/taskcluster/scripts/tester/test-ubuntu1604.sh
@@ -12,16 +12,17 @@ echo "running as" $(id)
 
 : MOZHARNESS_URL                ${MOZHARNESS_URL}
 : MOZHARNESS_SCRIPT             ${MOZHARNESS_SCRIPT}
 : MOZHARNESS_CONFIG             ${MOZHARNESS_CONFIG}
 : NEED_XVFB                     ${NEED_XVFB:=true}
 : NEED_WINDOW_MANAGER           ${NEED_WINDOW_MANAGER:=false}
 : NEED_PULSEAUDIO               ${NEED_PULSEAUDIO:=false}
 : START_VNC                     ${START_VNC:=false}
+: TASKCLUSTER_INTERACTIVE       ${TASKCLUSTER_INTERACTIVE:=false}
 : WORKSPACE                     ${WORKSPACE:=/home/worker/workspace}
 : mozharness args               "${@}"
 
 set -v
 cd $WORKSPACE
 
 fail() {
     echo # make sure error message is on a new line
@@ -37,20 +38,22 @@ if [[ -z ${MOZHARNESS_CONFIG} ]]; then f
 mkdir -p ~/artifacts/public
 
 cleanup() {
     local rv=$?
     if [[ -s /home/worker/.xsession-errors ]]; then
       # To share X issues
       cp /home/worker/.xsession-errors ~/artifacts/public/xsession-errors.log
     fi
-    # When you call this script with START_VNC we make sure we
-    # don't kill xvfb so you don't lose your VNC connection
-    if [ -n "$xvfb_pid" ] && [ $START_VNC == false ] ; then
+    # When you call this script with START_VNC or TASKCLUSTER_INTERACTIVE
+    # we make sure we do not kill xvfb so you do not lose your connection
+    xvfb_pid=`pidof Xvfb`
+    if [ -n "$xvfb_pid" ] && [ $START_VNC == false ] && [ $TASKCLUSTER_INTERACTIVE == false ] ; then
         kill $xvfb_pid || true
+        screen -XS xvfb quit || true
     fi
     exit $rv
 }
 trap cleanup EXIT INT
 
 # Unzip the mozharness ZIP file created by the build task
 if ! curl --fail -o mozharness.zip --retry 10 -L $MOZHARNESS_URL; then
     fail "failed to download mozharness zip"
@@ -58,22 +61,22 @@ fi
 rm -rf mozharness
 unzip -q mozharness.zip
 rm mozharness.zip
 
 if ! [ -d mozharness ]; then
     fail "mozharness zip did not contain mozharness/"
 fi
 
-# run XVfb in the background, if necessary
+# run Xvfb in the background, if necessary
 if $NEED_XVFB; then
-    Xvfb :0 -nolisten tcp -screen 0 1600x1200x24 \
-       > ~/artifacts/public/xvfb.log 2>&1 &
+    screen -dmS xvfb Xvfb :0 -nolisten tcp -screen 0 1600x1200x24 \
+       > ~/artifacts/public/xvfb.log 2>&1
     export DISPLAY=:0
-    xvfb_pid=$!
+
     # Only error code 255 matters, because it signifies that no
     # display could be opened. As long as we can open the display
     # tests should work. We'll retry a few times with a sleep before
     # failing.
     retry_count=0
     max_retries=2
     xvfb_test=0
     until [ $retry_count -gt $max_retries ]; do
@@ -146,13 +149,13 @@ echo -e "#!/usr/bin/env bash
 # the current working directory, see bug 1279237
 cd $WORKSPACE
 cmd=\"python2.7 $WORKSPACE/${MOZHARNESS_SCRIPT} ${config_cmds} ${@} \${@}\"
 echo \"Running: \${cmd}\"
 exec \${cmd}" > ${mozharness_bin}
 chmod +x ${mozharness_bin}
 
 # In interactive mode, the user will be prompted with options for what to do.
-if [ "$TASKCLUSTER_INTERACTIVE" != "true" ]; then
+if ! $TASKCLUSTER_INTERACTIVE; then
   # run the given mozharness script and configs, but pass the rest of the
   # arguments in from our own invocation
   ${mozharness_bin};
 fi