Index: tools/testing/dart/test_progress.dart |
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart |
index 3fdfbf3fa734a438dbf45bd27b96aa0c6ec35b84..c65aa1706164a0d67053f98c6983c789eb2ebd83 100644 |
--- a/tools/testing/dart/test_progress.dart |
+++ b/tools/testing/dart/test_progress.dart |
@@ -174,6 +174,30 @@ class ExitCodeSetter extends EventListener { |
} |
} |
+class IgnoredTestMonitor extends EventListener { |
+ static final int maxIgnored = 5; |
+ |
+ int countIgnored = 0; |
+ |
+ void done(TestCase test) { |
+ if (test.lastCommandOutput?.result(test) == Expectation.IGNORE) { |
kustermann
2016/06/24 13:36:44
Why the "?" ? There should be at least one command
Bill Hesse
2016/06/27 12:43:15
I wasn't sure.
Done.
|
+ countIgnored++; |
+ if (countIgnored > maxIgnored) { |
+ print("/nMore than $maxIgnored tests were ignored due to flakes in"); |
+ print("the test infrastructure. Output of the last ignored test was:"); |
kustermann
2016/06/24 13:36:44
You should probably add a comment about notifying
Bill Hesse
2016/06/27 12:43:15
Done.
|
+ print(_buildFailureOutput(test)); |
+ exit(1); |
+ } |
+ } |
+ } |
+ |
+ void allDone() { |
+ if (countIgnored > 0) { |
+ print("Ignored $countIgnored tests due to flaky infrastructure"); |
+ } |
+ } |
+} |
+ |
class FlakyLogWriter extends EventListener { |
void done(TestCase test) { |
if (test.isFlaky && test.result != Expectation.PASS) { |