summaryrefslogtreecommitdiffstats
path: root/testing/docker/tester/bin/test.sh
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /testing/docker/tester/bin/test.sh
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'testing/docker/tester/bin/test.sh')
-rw-r--r--testing/docker/tester/bin/test.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/docker/tester/bin/test.sh b/testing/docker/tester/bin/test.sh
new file mode 100644
index 000000000..6a5c9de74
--- /dev/null
+++ b/testing/docker/tester/bin/test.sh
@@ -0,0 +1,31 @@
+#! /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
+
+####
+# Now get the test-linux.sh script from the given Gecko tree and run it with
+# the same arguments.
+####
+
+[ -d $WORKSPACE ] || mkdir -p $WORKSPACE
+cd $WORKSPACE
+
+script=taskcluster/scripts/tester/test-b2g.sh
+url=${GECKO_HEAD_REPOSITORY}/raw-file/${GECKO_HEAD_REV}/${script}
+curl --fail -o ./test-b2g.sh --retry 10 $url
+chmod +x ./test-b2g.sh
+exec ./test-b2g.sh "${@}"
+