script/expect-post-runner.sh: Don't error out if UART plans don't exist
Handle the case when `$WORKSPACE/artefacts/debug/run/uart*` doesn't expand
to any file(s).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: I44001f90b45cbbd0572fb073a1db344dc35a50ce
diff --git a/script/expect-post-runner.sh b/script/expect-post-runner.sh
index c41851e..ab22562 100755
--- a/script/expect-post-runner.sh
+++ b/script/expect-post-runner.sh
@@ -20,6 +20,11 @@
failed=0
for uartdir in $WORKSPACE/artefacts/debug/run/uart*; do
+ # In case no dirs exist and the glob above isn't expanded at all.
+ if [ ! -d "$uartdir" ]; then
+ break
+ fi
+
uart=$(basename $uartdir)
if [ $uart == "uart0" ]; then
continue