From c6ce2208e3b6bf2fd1b51269dfdff4c57139af84 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Thu, 19 Apr 2018 09:57:46 +0800 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/1018560 Reviewed-by: Mary Ruthven --- util/flash_ec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/flash_ec b/util/flash_ec index a91709ee7f..04307929b7 100755 --- a/util/flash_ec +++ b/util/flash_ec @@ -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