From 7c473e8baf9456be4efd813e1774e633423a34ec Mon Sep 17 00:00:00 2001 From: Corentin LABBE Date: Tue, 17 Sep 2019 07:20:40 +0200 Subject: SPEC-2703: use lavacli identity 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 --- jjb/common/include-agl-lava-jobs-submit.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/jjb/common/include-agl-lava-jobs-submit.sh b/jjb/common/include-agl-lava-jobs-submit.sh index 8d8a4f9e..ec0cee69 100644 --- a/jjb/common/include-agl-lava-jobs-submit.sh +++ b/jjb/common/include-agl-lava-jobs-submit.sh @@ -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 -- cgit 1.2.3-korg