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

Unified Diff: presubmit_canned_checks.py

Issue 119285: Fix presubmit_support.py run standalone and RunPythonUnitTests (Closed)
Patch Set: Created 11 years, 6 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 | presubmit_support.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: presubmit_canned_checks.py
diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py
index ba8c3ed3dc8f2fe5c7a9fe735226ee9243777e9a..7897effd7896702a06d975ae25997754cb8d6048 100755
--- a/presubmit_canned_checks.py
+++ b/presubmit_canned_checks.py
@@ -135,7 +135,7 @@ def RunPythonUnitTests(input_api, output_api, unit_tests):
outputs = []
for unit_test in unit_tests:
try:
- tests_suite.extend(_RunPythonUnitTests_LoadTests(unit_test))
+ tests_suite.extend(_RunPythonUnitTests_LoadTests(input_api, unit_test))
except ImportError:
outputs.append(message_type("Failed to load %s" % unit_test,
long_text=input_api.traceback.format_exc()))
@@ -143,6 +143,6 @@ def RunPythonUnitTests(input_api, output_api, unit_tests):
results = input_api.unittest.TextTestRunner(verbosity=0).run(
input_api.unittest.TestSuite(tests_suite))
if not results.wasSuccessful():
- outputs.append(message_type(
- "%d unit tests failed." % (results.failures + results.errors)))
+ outputs.append(message_type("%d unit tests failed." %
+ (len(results.failures) + len(results.errors))))
return outputs
« no previous file with comments | « no previous file | presubmit_support.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698