This section needs special handling 08/21208/2
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Tue, 30 Apr 2019 15:13:01 +0000 (17:13 +0200)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 30 Apr 2019 15:57:31 +0000 (15:57 +0000)
TODO: rewrite to run under set -e !

Change-Id: I4f26d8e5de03d2a16a6b8c8825ce7bc9df8da5d4
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/common/include-agl-lava-jobs-submit.sh

index 7b28ed4..0177c9b 100644 (file)
@@ -31,6 +31,7 @@ echo "THe job id is: ${job_id}"
 JOB_URL="${url}scheduler/job/${job_id}"
 echo "Submitted as job: $JOB_URL"
 
+set -x
 #
 # LAVA job details, get job status from lavacli output
 #
@@ -43,6 +44,8 @@ if [ -z $JOB_TIMEOUT ]; then
        JOB_TIMEOUT=360
 fi
 
+# FIXME: this section needs to run under set +e
+set +e
 for i in $(seq 1 $JOB_TIMEOUT); do
     lavacli -i $lab jobs show $job_id --yaml > $JOB_STATUS
     if [ $? -ne 0 ];then
@@ -58,6 +61,9 @@ for i in $(seq 1 $JOB_TIMEOUT); do
     fi
     sleep 10
 done
+set -e
+# enable set -e again
+
 if [ $i -ge $JOB_TIMEOUT ];then
        echo "ERROR: job did not finished before 1 hour"
        exit 1