jjb/common: lava-labs-prepare: check only the available boards 29/20829/1
authorKhouloud Touil <ktouil@baylibre.com>
Wed, 27 Mar 2019 16:09:18 +0000 (17:09 +0100)
committerKhouloud Touil <ktouil@baylibre.com>
Wed, 27 Mar 2019 16:09:18 +0000 (17:09 +0100)
To avoid choosing a board with an offline status, this patch check
and lists only the boards with an Idle,Good status.

Change-Id: I64673c87b038b7e7e82001f7bfd2a35af5b73d60
Signed-off-by: Khouloud Touil <ktouil@baylibre.com>
jjb/common/include-agl-lava-labs-prepare.sh

index 70f3be6..f32e16f 100644 (file)
@@ -75,7 +75,7 @@ for lab in "${!labs[@]}"; do
 
     # lavacli: Find the LAVA lab that has the device available to run the job
     echo -n "lavacli: Checking for $lava_device at $full_url... "
-    lavacli_line=$(lavacli -i $lab devices list | grep $lava_device | head -1)
+    lavacli_line=$(lavacli -i $lab devices list | grep $lava_device | grep Idle,Good | head -1)
     lavacli_line=$(echo "$lavacli_line" | tr -d '[:space:]')
 
     if [ -z "$lavacli_line" ]; then