diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-06-26 18:23:38 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-06-28 21:50:51 -0700 |
commit | c4157673b909896884f594052ac2e19b0cfc2280 (patch) | |
tree | 91916870ac2819c1eb10a85175d70a6d018b5b1c /cts/cts.py | |
parent | 75efd78a59486cbcfb111ef314bafca67bc8d993 (diff) | |
download | chrome-ec-c4157673b909896884f594052ac2e19b0cfc2280.tar.gz |
eCTS: Use proper methods to reset boards
This patch makes cts.py call reset_halt and resume instead of calling
send_openocd_commands directly.
BUG=none
BRANCH=none
TEST=Run util/run_ects.py.
Change-Id: I179fb73d41842b927fda81c153848887bb2dff57
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/553581
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'cts/cts.py')
-rwxr-xr-x | cts/cts.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cts/cts.py b/cts/cts.py index 7781a2d8fc..0ef862d996 100755 --- a/cts/cts.py +++ b/cts/cts.py @@ -320,16 +320,16 @@ class Cts(object): # both boards must be rest and halted, with the th # resuming first, in order for the test suite to run in sync print 'Halting TH...' - if not self.th.send_open_ocd_commands(['init', 'reset halt']): + if not self.th.reset_halt(): raise RuntimeError('Failed to halt TH') print 'Halting DUT...' - if not self.dut.send_open_ocd_commands(['init', 'reset halt']): + if not self.dut.reset_halt(): raise RuntimeError('Failed to halt DUT') print 'Resuming TH...' - if not self.th.send_open_ocd_commands(['init', 'resume']): + if not self.th.resume(): raise RuntimeError('Failed to resume TH') print 'Resuming DUT...' - if not self.dut.send_open_ocd_commands(['init', 'resume']): + if not self.dut.resume(): raise RuntimeError('Failed to resume DUT') time.sleep(MAX_SUITE_TIME_SEC) @@ -342,10 +342,10 @@ class Cts(object): self.th.close_tty() print 'Halting TH...' - if not self.th.send_open_ocd_commands(['init', 'reset halt']): + if not self.th.reset_halt(): raise RuntimeError('Failed to halt TH') print 'Halting DUT...' - if not self.dut.send_open_ocd_commands(['init', 'reset halt']): + if not self.dut.reset_halt(): raise RuntimeError('Failed to halt DUT') if not dut_output or not th_output: |