Bug 1148995 - Display error message returned by testdroid endpoint r=me a=taskcluster-only

This commit is contained in:
Gregory Arndt 2015-03-29 21:07:01 -05:00
parent 464cf2c4b3
commit 078cd00b21
2 changed files with 9 additions and 2 deletions

View File

@ -1 +1 @@
0.0.2 0.0.3

View File

@ -5,9 +5,16 @@ python /home/worker/bin/validate_task.py
echo "Retrieving device" echo "Retrieving device"
res=`curl --request POST -H "Content-Type: application/json" -d "$DEVICE_CAPABILITIES" http://$CLOUD_HOST/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` status=`echo $res | jq .session`
if [[ $status == 'null' ]]; then if [ "$status" == "null" ]; then
echo "Session could not be created with a device." echo "Session could not be created with a device."
exit -1 exit -1
fi fi