summaryrefslogtreecommitdiff
path: root/cts/cts.py
diff options
context:
space:
mode:
authorChris Chen <twothreecc@google.com>2016-07-11 14:52:05 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-07-15 21:39:16 -0700
commit846741eddbb28e6770532ab09fb64dc619c2f6e6 (patch)
tree2e8e9815341d82ff83214ba5b4d94ef6869bd748 /cts/cts.py
parentdb1b3b34c21530672118754e84ddbe879925542e (diff)
downloadchrome-ec-846741eddbb28e6770532ab09fb64dc619c2f6e6.tar.gz
cts: Added GPIO test suite
Contains code for all the gpio tests so far. Code in cts_task for th and dut is for testing purposes and test result reporting will be updated in the next patch. BRANCH=None BUG=None TEST=Manual - Connect handshake and gpio test lines between th and dut - Build tests - run 'cat /dev/ttyACM0' in one terminal - run 'cat /def/ttyACM1' in another - Flash boards - All test results should print either passed or unknown Change-Id: I7142fb87a6ce0a20c571cde608fbbe60e35898ea Reviewed-on: https://chromium-review.googlesource.com/359935 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'cts/cts.py')
-rwxr-xr-xcts/cts.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/cts/cts.py b/cts/cts.py
index 9c4940b6ff..79550a9aff 100755
--- a/cts/cts.py
+++ b/cts/cts.py
@@ -106,19 +106,17 @@ def flash_boards(dut_board, th_serial_loc):
'flash write_image erase build/' + th_board + '/ec.bin 0x08000000',
'reset halt']
- dut_flash_cmds = ['reset_config connect_assert_srst',
+ dut_flash_cmds = ['hla_serial ' + dut_hla,
+ 'reset_config connect_assert_srst',
'init',
'reset init',
'flash write_image erase build/' + dut_board + '/ec.bin 0x08000000',
'reset halt']
- if dut_hla != None:
- dut_flash_cmds.insert(0, 'hla_serial ' + dut_hla)
-
openocd_cmd(th_flash_cmds, th_cfg)
openocd_cmd(dut_flash_cmds, dut_cfg)
- openocd_cmd(['init', 'reset init', 'resume'], th_cfg)
- openocd_cmd(['init', 'reset init', 'resume'], dut_cfg)
+ openocd_cmd(['hla_serial ' + th_hla, 'init', 'reset init', 'resume'], th_cfg)
+ openocd_cmd(['hla_serial ' + dut_hla, 'init', 'reset init', 'resume'], dut_cfg)
def main():
global ocd_script_dir