summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWai-Hong Tam <waihong@google.com>2016-11-10 14:43:47 -0800
committerchrome-bot <chrome-bot@chromium.org>2016-11-10 21:28:57 -0800
commit31df657df86a7b8c9a1be602343c52e4a5815dc3 (patch)
treeab8a3f85b4786a52553f471aa7bdf99d89ead864
parent2ae311c901602f0be553d4d3e2bf91e435ce5bd0 (diff)
downloadchrome-ec-31df657df86a7b8c9a1be602343c52e4a5815dc3.tar.gz
flash_ec: Only check the board in the raiden list if the board not empty
The firmware provision job running in the lab calls the flash_ec script with the --chip parameter, instead of the --board parameter. So only check if the board name is in the raiden list if it is a non-empty board. BRANCH=none BUG=chrome-os-partner:58039 TEST=Manually triggered the flash_ec command: $ flash_ec --chip=npcx_spi --image=${IMAGE} --port=9999 --raiden Change-Id: I25fef906d93803a94c544f7699ce494a84c46bd8 Reviewed-on: https://chromium-review.googlesource.com/410162 Commit-Ready: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
-rwxr-xr-xutil/flash_ec3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/flash_ec b/util/flash_ec
index 1d25112abc..5a7b112163 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -285,7 +285,8 @@ on_servov3() {
# Returns 0 on success (if raiden should be used instead of servo)
on_raiden() {
- if $(in_array "${BOARDS_RAIDEN[@]}" "${BOARD}") && \
+ if ([ -z "${BOARD}" ] || \
+ $(in_array "${BOARDS_RAIDEN[@]}" "${BOARD}")) && \
[ "${FLAGS_raiden}" = ${FLAGS_TRUE} ] ; then
return 0
fi