[coreboot-gerrit] New patch to review for coreboot: af580b4 board_status.sh add non-fatal test_cmd
Martin Roth (gaumless@gmail.com)
gerrit at coreboot.org
Thu Jul 10 23:02:38 CEST 2014
Martin Roth (gaumless at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6257
-gerrit
commit af580b43b2a8b5e8d338a50e4af1f7ba351cb649
Author: Martin Roth <martin.roth at se-eng.com>
Date: Sun Jun 22 21:46:24 2014 -0600
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 at se-eng.com>
---
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 65576f4..7c321b3 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"
More information about the coreboot-gerrit
mailing list