From be5340bad23af53b4e78adb143fed926ff199c7c Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sun, 22 Jun 2014 21:46:24 -0600 Subject: board_status.sh add non-fatal test_cmd - add a non-fatal option to test_cmd. Change-Id: If74693ea7ec8ea24104d5836e4c24bfb135ef0e1 Signed-off-by: Martin Roth Reviewed-on: http://review.coreboot.org/6257 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: David Hendricks --- util/board_status/board_status.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/util/board_status/board_status.sh b/util/board_status/board_status.sh index 65576f4d31..7c321b3fe7 100755 --- a/util/board_status/board_status.sh +++ b/util/board_status/board_status.sh @@ -17,11 +17,15 @@ UPLOAD_RESULTS=0 # if command should be run remoteley when a remote host is specified. LOCAL=0 REMOTE=1 +FATAL=0 +NONFATAL=1 # test a command # # $1: test command on remote host (0=no, 1=yes) # $2: command to test +# $3: 0 ($FATAL) Exit with an error if the command fails +# 1 ($NONFATAL) Don't exit on command test failure test_cmd() { local rc @@ -39,7 +43,11 @@ test_cmd() fi if [ $rc -eq 0 ]; then - return + return 0 + fi + + if [ $3 -eq 1 ]; then + return 1 fi echo "$2 not found" -- cgit v1.2.3