summaryrefslogtreecommitdiff
path: root/cts/common
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2016-09-30 16:37:48 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-10-05 14:33:33 -0700
commita51cee362a5682e83ceee290ee878a13a4f00212 (patch)
treea2c0629bc7794c9c677006b4fcd84a64630cc60d /cts/common
parente40fb3ef58a47d13418b2b6665026cf2ae5fd51e (diff)
downloadchrome-ec-a51cee362a5682e83ceee290ee878a13a4f00212.tar.gz
cts: Fail script when build or flash fails
This change makes cts.py fail when building or flashing a module for DUT or TH fails. BUG=none BRANCH=none TEST=Made cts.py fail by injecting build and flash error Change-Id: Iec1e11f4a8c261eb4c989b118df218e86cb6f5f1 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/393326 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'cts/common')
-rw-r--r--cts/common/board.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cts/common/board.py b/cts/common/board.py
index 68d447fb51..7b09e2a9f1 100644
--- a/cts/common/board.py
+++ b/cts/common/board.py
@@ -93,7 +93,7 @@ class Board(object):
for cmd in commands:
args += ['-c', cmd]
args += ['-c', 'shutdown']
- sp.call(args)
+ return sp.call(args)
def build(self, module, ec_dir, debug=False):
"""Builds test suite module for board
@@ -116,7 +116,7 @@ class Board(object):
cmds.append('CTS_DEBUG=TRUE')
print ' '.join(cmds)
- sp.call(cmds)
+ return sp.call(cmds)
def flash(self):
"""Flashes board with most recent build ec.bin"""
@@ -125,7 +125,7 @@ class Board(object):
'init',
'reset init',
'flash write_image erase %s %s' % (image_path, self.flash_offset)]
- self.send_open_ocd_commands(cmd)
+ return self.send_open_ocd_commands(cmd)
def to_string(self):
s = ('Type: Board\n'