SPEC-2703: use lavacli identity 37/22437/2
authorCorentin LABBE <clabbe@baylibre.com>
Tue, 17 Sep 2019 05:20:40 +0000 (07:20 +0200)
committerCorentin LABBE <clabbe@baylibre.com>
Tue, 17 Sep 2019 12:07:46 +0000 (14:07 +0200)
The lavacli results does not provide the identity argument and so does
not work.
This patch adds the missing "-i $lab" for made it works.

While at it, this patch converts two hardcoded "-i agl" call to use the correct
lab variable.

As asked during the meeting, let's add a sanity check that this lab
variable is set.

Bug-AGL: SPEC-2703
Change-Id: I9432f8b27aa7157e08b48f5caeb905a18152fa6a
Signed-off-by: Corentin LABBE <clabbe@baylibre.com>
jjb/common/include-agl-lava-jobs-submit.sh

index 8d8a4f9..ec0cee6 100644 (file)
@@ -26,6 +26,11 @@ cat $JOB_FILE | sed "s/device_type: $releng_device$/device_type: $lava_device/"
 #
 JOB_STATUS="${JOB_BASE}_${LAVA_LAB}.status"
 
+if [ -z "$lab" ];then
+       echo "WARNING: lab is empty fallback to agl lab"
+       lab=agl
+fi
+
 job_id=$(lavacli -i $lab jobs submit $JOB_FILE_NEW)
 if [ $? -ne 0 ]; then
        echo "ERROR: job submission error"
@@ -43,8 +48,8 @@ echo "####################################################"
 echo ""
 
 # use lavacli wait job instead of the polling.
-lavacli -i agl jobs wait $job_id --timeout 7200
-lavacli -i agl jobs show $job_id --yaml > $JOB_STATUS
+lavacli -i $lab jobs wait $job_id --timeout 7200
+lavacli -i $lab jobs show $job_id --yaml > $JOB_STATUS
 state=$(grep ^state: $JOB_STATUS| cut -d' ' -f2)
 if [ "$state" == "Finished" ]; then
         status=$(grep ^health: $JOB_STATUS| cut -d' ' -f2)
@@ -124,7 +129,7 @@ handle_skiplist() {
 }
 
 # Analyze jobs results
-lavacli results $job_id | tee job-result
+lavacli -i $lab results $job_id | tee job-result
 
 # GOODJOB is equal to 0 if any test fail (and not present in a skiplist), 1 if all test are success
 GOODJOB=1