Bug 1148995 - Display error message returned by testdroid endpoint r=me a=taskcluster-only
authorGregory Arndt <garndt@mozilla.com>
Sun, 29 Mar 2015 21:07:01 -0500
changeset 236497 5a67281405a2cf66f1aadd5fde1a42b74763f911
parent 236448 dfe60814eda70948c866d548498cc6dbe5f1de5c
child 236498 fc5d7263b1da409fe7488e83c9f626efbaaa8c8a
push id28511
push userkwierso@gmail.com
push dateTue, 31 Mar 2015 02:34:53 +0000
treeherdermozilla-central@8af276ab8636 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, taskcluster-only
bugs1148995
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 1148995 - Display error message returned by testdroid endpoint r=me a=taskcluster-only
testing/docker/tester-device/VERSION
testing/docker/tester-device/bin/entrypoint
--- a/testing/docker/tester-device/VERSION
+++ b/testing/docker/tester-device/VERSION
@@ -1,1 +1,1 @@
-0.0.2
+0.0.3
--- a/testing/docker/tester-device/bin/entrypoint
+++ b/testing/docker/tester-device/bin/entrypoint
@@ -1,18 +1,25 @@
 #! /bin/bash -e
 
 echo "Validating Task"
 python /home/worker/bin/validate_task.py
 
 echo "Retrieving device"
 res=`curl --request POST -H "Content-Type: application/json" -d "$DEVICE_CAPABILITIES" http://$CLOUD_HOST/device`
+error=`echo $res | jq .error`
+
+if [ "$error" != "null" ]; then
+    echo $error
+    exit -1
+fi
+
 status=`echo $res | jq .session`
 
-if [[ $status == 'null' ]]; then
+if [ "$status" == "null" ]; then
     echo "Session could not be created with a device."
     exit -1
 fi
 
 export SESSION_ID=`echo $res | jq .session.id`
 export SERIAL_ID=`echo $res | jq -r .proxies.adb.serialId`
 export ADB_HOST=`echo $res | jq .proxies.adb.forwardHost`
 export ADB_PORT=`echo $res | jq .proxies.adb.port`