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

Unified Diff: mojo/tools/apptest_runner.py

Issue 1499463002: mojo-apptests: Fix detecting failure when no test ran. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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: mojo/tools/apptest_runner.py
diff --git a/mojo/tools/apptest_runner.py b/mojo/tools/apptest_runner.py
index 6494db73cb1f8dee538345343d56b32f0967bdfb..ae65ebcb89b0849d122495cd0de655c3e0194640 100755
--- a/mojo/tools/apptest_runner.py
+++ b/mojo/tools/apptest_runner.py
@@ -85,11 +85,11 @@ def main():
if gtest_filter and not ran and not fail:
print '[ NO TESTS ] ' + (test_name if args.verbose else '')
continue
- # Use the apptest name if the whole suite failed or no fixtures were run.
- fail = [test_name] if (not ran and (not fail or fail == [test])) else fail
+ result = (not ran) or (ran and not fail)
+ # Use the apptest name if the whole suite failed.
+ fail = [test_name] if (not result and fail == [test]) else fail
tests.extend(ran)
failed.extend(fail)
- result = ran and not fail
print '[ PASSED ]' if result else '[ FAILED ]',
print test_name if args.verbose or not result else ''
# Abort when 3 apptest suites, or a tenth of all, have failed.
« 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