When no device of the requested device-type is available, abort early
with a useful error message, otherwise job continues and fails in
confusing ways.
Change-Id: I8fdb4160a1ca88d8ba5eb768d70975e9466f696a
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
releng_device=${arr[1]}
# And agl_device=${MACHINE}
+device_available=0
for lab in "${!labs[@]}"; do
val=${labs[$lab]}
OFS=${IFS}
break
fi
done
+
+if [ "$device_available" -eq 0 ]; then
+ echo ""
+ echo "ERROR: device not found in any available lab."
+ exit 1
+fi