summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosie Nordrum <JosieNordrum@google.com>2021-02-11 12:22:14 -0700
committerCommit Bot <commit-bot@chromium.org>2021-05-05 20:31:31 +0000
commit51f52fa476dd99b2ac7d0e65b3a8abaf17d102af (patch)
tree1a233a7417625774dd3c4be1ade2f44c68f56311
parent45cdc0f7acd939efc686b4e600b32445f1e017f3 (diff)
downloadchrome-ec-51f52fa476dd99b2ac7d0e65b3a8abaf17d102af.tar.gz
run_device_tests: remove -n flag from dut-control cmd
Removed the servo board name flag from dut-control command in run_device_tests.py. This flag is needed when there are many servos connected with servods running. Grepped platform/ec directory to remove all uses of this flag. BRANCH=None BUG=None TEST=ran AES test on dartmonkey with servo micro and jlink attached ./test/run_device_tests.py -b dartmonkey -t aes Signed-off-by: Josie Nordrum <JosieNordrum@google.com> Change-Id: I97bf3cd4c524a2b5fb292d255cde57a8b65fcdc4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2689320 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Josie Nordrum <josienordrum@google.com> Tested-by: Josie Nordrum <josienordrum@google.com>
-rwxr-xr-xtest/run_device_tests.py17
1 files changed, 7 insertions, 10 deletions
diff --git a/test/run_device_tests.py b/test/run_device_tests.py
index b30ddcfd49..6cc1702760 100755
--- a/test/run_device_tests.py
+++ b/test/run_device_tests.py
@@ -200,11 +200,10 @@ BOARD_CONFIGS = {
}
-def get_console(board_name: str, board_config: BoardConfig) -> Optional[str]:
+def get_console(board_config: BoardConfig) -> Optional[str]:
"""Get the name of the console for a given board."""
cmd = [
'dut-control',
- '-n', board_name,
board_config.servo_uart_name,
]
logging.debug('Running command: "%s"', ' '.join(cmd))
@@ -219,7 +218,7 @@ def get_console(board_name: str, board_config: BoardConfig) -> Optional[str]:
return None
-def power(board_name: str, board_config: BoardConfig, on: bool) -> None:
+def power(board_config: BoardConfig, on: bool) -> None:
"""Turn power to board on/off."""
if on:
state = 'pp3300'
@@ -228,14 +227,13 @@ def power(board_name: str, board_config: BoardConfig, on: bool) -> None:
cmd = [
'dut-control',
- '-n', board_name,
board_config.servo_power_enable + ':' + state,
]
logging.debug('Running command: "%s"', ' '.join(cmd))
subprocess.run(cmd).check_returncode()
-def hw_write_protect(board_name: str, enable: bool) -> None:
+def hw_write_protect(enable: bool) -> None:
"""Enable/disable hardware write protect."""
if enable:
state = 'on'
@@ -244,7 +242,6 @@ def hw_write_protect(board_name: str, enable: bool) -> None:
cmd = [
'dut-control',
- '-n', board_name,
'fw_wp_en' + ':' + state,
]
logging.debug('Running command: "%s"', ' '.join(cmd))
@@ -450,15 +447,15 @@ def main():
continue
if test.toggle_power:
- power(args.board, board_config, on=False)
+ power(board_config, on=False)
time.sleep(1)
- power(args.board, board_config, on=True)
+ power(board_config, on=True)
- hw_write_protect(args.board, test.enable_hw_write_protect)
+ hw_write_protect(test.enable_hw_write_protect)
# run the test
logging.info('Running test: "%s"', test.name)
- console = get_console(args.board, board_config)
+ console = get_console(board_config)
test.passed = run_test(test, console, executor=e)
colorama.init()