From: Khouloud Touil Date: Thu, 9 May 2019 08:08:07 +0000 (+0200) Subject: Avoid an extra 1min wait for the Idle,Good board X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=792d809796c7619aab642ba171b377e9a43cf235;p=ci-management.git Avoid an extra 1min wait for the Idle,Good board As we have to wait 60s for each retry, this patch avoid to keep the Idle,Good boards waitong an extra 60s. Change-Id: I34dd47362da5e2de14103cc374c9b6f4cd830aa7 Signed-off-by: Khouloud Touil --- diff --git a/jjb/common/include-agl-lava-labs-prepare.sh b/jjb/common/include-agl-lava-labs-prepare.sh index ab60a739..bfa213c4 100644 --- a/jjb/common/include-agl-lava-labs-prepare.sh +++ b/jjb/common/include-agl-lava-labs-prepare.sh @@ -103,14 +103,13 @@ for lab in "${!labs[@]}"; do for i in `seq 1 $retries` do # device is only available if "idle" or "running" - sleep 60s # Look if the status of the board has changed from reserved in the lab echo -n "Checking for $lava_device at $full_url... " lavacli_line=$(lavacli -i $lab devices list | grep $lava_device | grep Good | head -1) lavacli_line=$(echo "$lavacli_line" | tr -d '[:space:]') if [ -z "$lavacli_line" ]; then echo "not found." - continue + break fi IFS=':' arr=($lavacli_line) @@ -119,15 +118,14 @@ for lab in "${!labs[@]}"; do if [ x"$device_status" = x"Reserved,Good" ]; then echo "Device still reserved, retries left: $retries ." - continue elif [ x"$device_status" = x"Idle,Good" ]; then # IDLE AND GOOD means we can grab it device_available=1 break elif [ x"$device_status" = x"Running,Good" ]; then echo "Device still running (other job), retries left: $retries ." - continue fi + sleep 60s done if [ $device_available = 0 ]; then