diff options
author | Martin Roth <martin.roth@se-eng.com> | 2014-06-22 21:46:24 -0600 |
---|---|---|
committer | Martin Roth <gaumless@gmail.com> | 2014-07-15 03:04:31 +0200 |
commit | be5340bad23af53b4e78adb143fed926ff199c7c (patch) | |
tree | d3e6c68e898e91554f116f181e165ff75301f8be /util/board_status | |
parent | 2fa8cc35a8e65bfc9d1e1571069fc4d0bad83410 (diff) |
board_status.sh add non-fatal test_cmd
- add a non-fatal option to test_cmd.
Change-Id: If74693ea7ec8ea24104d5836e4c24bfb135ef0e1
Signed-off-by: Martin Roth <martin.roth@se-eng.com>
Reviewed-on: http://review.coreboot.org/6257
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Diffstat (limited to 'util/board_status')
-rwxr-xr-x | util/board_status/board_status.sh | 10 |
1 files changed, 9 insertions, 1 deletions
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" |