From eb128da8fdda07d8f8f74ff941961992a9a52adc Mon Sep 17 00:00:00 2001 From: Loys Ollivier Date: Wed, 8 Nov 2017 14:03:21 +0100 Subject: CIBT improve lava lab searching and coding style Fix coding style, indentation. Improve the lab search, if a lab has the device do not search in others as it won't be used. Change-Id: I7471511ff7af3d2f6d8708943b42099a450ef770 Signed-off-by: Loys Ollivier --- jjb/common/include-agl-lava-jobs-submit.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'jjb/common/include-agl-lava-jobs-submit.sh') diff --git a/jjb/common/include-agl-lava-jobs-submit.sh b/jjb/common/include-agl-lava-jobs-submit.sh index e7aed028..8ab3df15 100644 --- a/jjb/common/include-agl-lava-jobs-submit.sh +++ b/jjb/common/include-agl-lava-jobs-submit.sh @@ -42,8 +42,8 @@ for device_type in $device_types; do echo -n "Checking for $device_type at $full_url... " line=$(lava-tool devices-list $full_url |grep $device_type | tr -d '[:space:]') if [ -z "$line" ]; then - echo "not found." - continue + echo "not found." + continue fi IFS='|' arr=($line) @@ -53,16 +53,16 @@ for device_type in $device_types; do # device is only available if "idle" or "running" device_available=0 if [ x"$device_status" = x"idle" ]; then - device_available=1 + device_available=1 elif [ x"$device_status" = x"running" ]; then - device_available=1; + device_available=1; fi if [ $device_available = 0 ]; then - echo " Not Available. Status: $device_status" - continue + echo " Not Available. Status: $device_status" + continue else - echo " Found and available. Status: $device_status" + echo " Found and available. Status: $device_status" fi # Need to hack the real device-type name in the job file @@ -101,9 +101,9 @@ for device_type in $device_types; do # after one successful submit, we're done if [ x"$status" = x"Complete" ]; then - exit 0 + exit 0 else - continue + continue fi done -- cgit 1.2.3-korg