autotest: Require servo_host among servo attributes from host info
BUG=chromium:881006
TEST=test_that -b soraka <dut_ip> \
--autotest_dir ~/trunk/src/third_party/autotest/files/ \
--args="servo_host=localhost servo_port=9903" \
firmware_ECPowerButton
Change-Id: Ib150d8350d208f0eb35e24a435669a5ac357c412
Reviewed-on: https://chromium-review.googlesource.com/1208893
Commit-Ready: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
diff --git a/server/hosts/servo_host.py b/server/hosts/servo_host.py
index 6352319..d33a51e 100644
--- a/server/hosts/servo_host.py
+++ b/server/hosts/servo_host.py
@@ -760,7 +760,7 @@
if info.board:
servo_args[SERVO_BOARD_ATTR] = _map_afe_board_to_servo_board(info.board)
- return servo_args
+ return servo_args if SERVO_HOST_ATTR in servo_args else None
def _tweak_args_for_ssp_moblab(servo_args):