Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Unified Diff: bin/cros_au_test_harness.py

Issue 3593010: Propagate return code correctly from tests. (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bin/cros_au_test_harness.py
diff --git a/bin/cros_au_test_harness.py b/bin/cros_au_test_harness.py
index 7646588ccf8adacd1c9a9dfb21a4547cdc0d5a0e..a495f06f9bd21230ec05da69933b70ad716b9c9c 100755
--- a/bin/cros_au_test_harness.py
+++ b/bin/cros_au_test_harness.py
@@ -124,7 +124,7 @@ class RealAUTest(unittest.TestCase, AUTest):
], enter_chroot=False)
- def NotVerifyImage(self):
+ def VerifyImage(self):
"""Verifies an image using run_remote_tests.sh with verification suite."""
RunCommand([
'%s/run_remote_tests.sh' % self.crosutils,
@@ -229,10 +229,12 @@ if __name__ == '__main__':
if not board:
parser.error('Need board to convert base image to vm.')
+ return_code = 0
+
# Only run the test harness we care about.
if options.type == 'vm':
suite = unittest.TestLoader().loadTestsFromTestCase(VirtualAUTest)
- unittest.TextTestRunner(verbosity=2).run(suite)
+ return_code = unittest.TextTestRunner(verbosity=2).run(suite)
elif options.type == 'real':
if not options.remote:
parser.error('Real tests require a remote test machine.')
@@ -240,6 +242,8 @@ if __name__ == '__main__':
remote = options.remote
suite = unittest.TestLoader().loadTestsFromTestCase(RealAUTest)
- unittest.TextTestRunner(verbosity=2).run(suite)
+ return_code = unittest.TextTestRunner(verbosity=2).run(suite)
else:
parser.error('Could not parse harness type %s.' % options.type)
+
+ sys.exit(return_code)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698