Backed out changeset 25bc6ca8f19f (bug 1294234) for breaking TC tests
authorGregory Szorc <gps@mozilla.com>
Fri, 12 Aug 2016 21:23:41 -0700
changeset 400806 b17f42ecbc3cb0c36ca7215762c5f972722c8321
parent 400805 695f4691352c0664e5dfb12f73bd0e1b1d9f8a9b
child 400807 e129019c9d4e83fd52a909abd6a6b6065ee22d6d
push id26289
push userbmo:npancholi@mozilla.com
push dateMon, 15 Aug 2016 22:10:02 +0000
bugs1294234
milestone51.0a1
backs out25bc6ca8f19ffb1c8419fe441c341202991bb85c
Backed out changeset 25bc6ca8f19f (bug 1294234) for breaking TC tests Introduced a (possibly intermittent) permissions failure downloading mozharness. Might be cache related.
taskcluster/scripts/tester/test-ubuntu1204.sh
taskcluster/scripts/tester/test-ubuntu1604.sh
taskcluster/taskgraph/transforms/tests/make_task_description.py
testing/docker/desktop-test/Dockerfile
testing/docker/desktop-test/bin/test.sh
testing/docker/desktop1604-test/bin/test.sh
--- a/taskcluster/scripts/tester/test-ubuntu1204.sh
+++ b/taskcluster/scripts/tester/test-ubuntu1204.sh
@@ -17,19 +17,17 @@ echo "running as" $(id)
 : 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
-
-mkdir -p ${WORKSPACE}
-cd ${WORKSPACE}
+cd $WORKSPACE
 
 fail() {
     echo # make sure error message is on a new line
     echo "[test-linux.sh:error]" "${@}"
     exit 1
 }
 
 # test required parameters are supplied
--- a/taskcluster/scripts/tester/test-ubuntu1604.sh
+++ b/taskcluster/scripts/tester/test-ubuntu1604.sh
@@ -17,19 +17,17 @@ echo "running as" $(id)
 : 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
-
-mkdir -p ${WORKSPACE}
-cd ${WORKSPACE}
+cd $WORKSPACE
 
 fail() {
     echo # make sure error message is on a new line
     echo "[test-linux.sh:error]" "${@}"
     exit 1
 }
 
 # test required parameters are supplied
--- a/taskcluster/taskgraph/transforms/tests/make_task_description.py
+++ b/taskcluster/taskgraph/transforms/tests/make_task_description.py
@@ -187,22 +187,18 @@ def docker_worker_setup(config, test, ta
             'mount-point': '/home/worker/tooltool-cache',
         })
         taskdesc['scopes'].extend([
             'docker-worker:relengapi-proxy:tooltool.download.internal',
             'docker-worker:relengapi-proxy:tooltool.download.public',
         ])
 
     # assemble the command line
-    command = [
-        '/home/worker/bin/run-task',
-        '--',
-        '/home/worker/bin/test-linux.sh',
-    ]
 
+    command = ["bash", "/home/worker/bin/test.sh"]
     if mozharness.get('no-read-buildbot-config'):
         command.append("--no-read-buildbot-config")
     command.extend([
         {"task-reference": "--installer-url=" + installer_url},
         {"task-reference": "--test-packages-url=" + test_packages_url},
     ])
     command.extend(mozharness.get('extra-options', []))
 
--- a/testing/docker/desktop-test/Dockerfile
+++ b/testing/docker/desktop-test/Dockerfile
@@ -33,16 +33,17 @@ ENV           USER          worker
 ENV           LOGNAME       worker
 ENV           HOSTNAME      taskcluster-worker
 ENV           LANG          en_US.UTF-8
 ENV           LC_ALL        en_US.UTF-8
 
 # Add utilities and configuration
 COPY           dot-files/config              /home/worker/.config
 COPY           dot-files/pulse               /home/worker/.pulse
+COPY           bin                           /home/worker/bin
 RUN            chmod +x bin/*
 # TODO: remove this when buildbot is gone
 COPY           buildprops.json               /home/worker/buildprops.json
 COPY           tc-vcs-config.yml /etc/taskcluster-vcs.yml
 
 # TODO: remove
 ADD            https://raw.githubusercontent.com/taskcluster/buildbot-step/master/buildbot_step /home/worker/bin/buildbot_step
 RUN chmod u+x /home/worker/bin/buildbot_step
new file mode 100644
--- /dev/null
+++ b/testing/docker/desktop-test/bin/test.sh
@@ -0,0 +1,20 @@
+#! /bin/bash -vex
+
+set -x -e
+
+: GECKO_HEAD_REPOSITORY         ${GECKO_HEAD_REPOSITORY:=https://hg.mozilla.org/mozilla-central}
+: GECKO_HEAD_REV                ${GECKO_HEAD_REV:=default}
+: WORKSPACE                     ${WORKSPACE:=/home/worker/workspace}
+
+
+# TODO: when bug 1093833 is solved and tasks can run as non-root, reduce this
+# to a simple fail-if-root check
+if [ $(id -u) = 0 ]; then
+    chown -R worker:worker /home/worker
+    # drop privileges by re-running this script
+    exec sudo -E -u worker bash /home/worker/bin/test.sh "${@}"
+fi
+
+[ -d $WORKSPACE ] || mkdir -p $WORKSPACE
+cd $WORKSPACE
+exec /home/worker/bin/test-linux.sh "${@}"
new file mode 100644
--- /dev/null
+++ b/testing/docker/desktop1604-test/bin/test.sh
@@ -0,0 +1,20 @@
+#! /bin/bash -vex
+
+set -x -e
+
+: GECKO_HEAD_REPOSITORY         ${GECKO_HEAD_REPOSITORY:=https://hg.mozilla.org/mozilla-central}
+: GECKO_HEAD_REV                ${GECKO_HEAD_REV:=default}
+: WORKSPACE                     ${WORKSPACE:=/home/worker/workspace}
+
+
+# TODO: when bug 1093833 is solved and tasks can run as non-root, reduce this
+# to a simple fail-if-root check
+if [ $(id -u) = 0 ]; then
+    chown -R worker:worker /home/worker
+    # drop privileges by re-running this script
+    exec sudo -E -u worker bash /home/worker/bin/test.sh "${@}"
+fi
+
+[ -d $WORKSPACE ] || mkdir -p $WORKSPACE
+cd $WORKSPACE
+exec /home/worker/bin/test-linux.sh "${@}"