flash_ec: Fix SERVO_TYPE test

Without this, we see this line when running flash_ec.
util/flash_ec: line 787: [: =~: binary operator expected

These kind of tests require double brackets.

BUG=b:77825616
BRANCH=none
TEST=run util/flash_ec using servo_micro on staff.

Change-Id: I6baecec2252276ac06992fd2b2e50f74d55805f2
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1018560
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
This commit is contained in:
Nicolas Boichat
2018-04-19 09:57:46 +08:00
committed by chrome-bot
parent 49241f476e
commit c6ce2208e3

View File

@@ -784,7 +784,7 @@ function flash_stm32() {
info "${MCU} UART pty : ${EC_UART}"
claim_pty ${EC_UART}
if ! on_raiden && [ "${SERVO_TYPE}" =~ "servo" ] ; then
if ! on_raiden && [[ "${SERVO_TYPE}" =~ "servo" ]] ; then
dut_control ${MCU}_uart_en:on
fi
dut_control ${MCU}_uart_parity:even