Index: dart/tools/test.py |
diff --git a/dart/tools/test.py b/dart/tools/test.py |
index 33006af97664b124dc4bf77587ca92214f48a7d8..17313fcad59c44afff6e4e263f92a46b76ef5136 100755 |
--- a/dart/tools/test.py |
+++ b/dart/tools/test.py |
@@ -266,7 +266,6 @@ class VerboseProgressIndicator(SimpleProgressIndicator): |
class OneLineProgressIndicator(SimpleProgressIndicator): |
- """Results of each test is printed like a report, on a line by itself.""" |
def AboutToRun(self, case): |
"""Called before each test case is run.""" |
@@ -284,6 +283,27 @@ class OneLineProgressIndicator(SimpleProgressIndicator): |
print 'Done %s: %s' % (output.test.GetLabel(), outcome) |
+class StatusFileProgressIndicator(SimpleProgressIndicator): |
+ """Results of each test is printed like a report, on a line by itself.""" |
+ |
+ 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, |
} |