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

Unified Diff: dart/tools/test.py

Issue 8430028: Update to co19 revision 15. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments Created 9 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
Index: dart/tools/test.py
diff --git a/dart/tools/test.py b/dart/tools/test.py
index 33006af97664b124dc4bf77587ca92214f48a7d8..0914cd44e8a13e54ee407c9aead9a98af70080fc 100755
--- a/dart/tools/test.py
+++ b/dart/tools/test.py
@@ -284,6 +284,26 @@ class OneLineProgressIndicator(SimpleProgressIndicator):
print 'Done %s: %s' % (output.test.GetLabel(), outcome)
+class StatusFileProgressIndicator(SimpleProgressIndicator):
+
+ def AboutToRun(self, case):
+ """Called before each test case is run."""
+ pass
+
+ def HasRun(self, output):
+ """Called after each test case is run."""
+ actual_outcome = output.GetOutcome()
+ expected_outcomes = set(output.test.outcomes)
+ if not actual_outcome in expected_outcomes:
+ expected_outcomes.discard(testing.PASS)
+ if expected_outcomes:
+ print 'Incorrect status for %s: %s' % (output.test.GetLabel(),
+ ', '.join(expected_outcomes))
+ else:
+ print 'Update status for %s: %s' % (output.test.GetLabel(),
+ actual_outcome)
+
+
class OneLineProgressIndicatorForBuildBot(OneLineProgressIndicator):
def HasRun(self, output):
@@ -400,7 +420,8 @@ PROGRESS_INDICATORS = {
'mono': MonochromeProgressIndicator,
'color': ColorProgressIndicator,
'line': OneLineProgressIndicator,
- 'buildbot': OneLineProgressIndicatorForBuildBot
+ 'buildbot': OneLineProgressIndicatorForBuildBot,
+ 'status': StatusFileProgressIndicator,
}

Powered by Google App Engine
This is Rietveld 408576698