| Index: tools/testing/dart/test_progress.dart
|
| diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
|
| index 44c94c8d287cf3d07e3e627c1eeb48df2b06860e..528d921b4f72c2e6d0098af577b8c5ee1e86c47e 100644
|
| --- a/tools/testing/dart/test_progress.dart
|
| +++ b/tools/testing/dart/test_progress.dart
|
| @@ -7,6 +7,7 @@
|
| #import("dart:io");
|
| #import("test_runner.dart");
|
| #import("test_suite.dart");
|
| +#import("status_file_parser.dart");
|
|
|
| class ProgressIndicator {
|
| ProgressIndicator(this._startTime, this._printTiming)
|
| @@ -45,6 +46,14 @@ class ProgressIndicator {
|
| }
|
|
|
| void done(TestCase test) {
|
| + if (test.isFlaky && test.output.result != PASS) {
|
| + var buf = new StringBuffer();
|
| + for (var l in _buildFailureOutput(test)) {
|
| + buf.add("$l\n");
|
| + }
|
| + _appendToFlakyFile(buf.toString());
|
| + }
|
| +
|
| if (test.output.unexpectedOutput) {
|
| _failedTests++;
|
| _printFailureOutput(test);
|
| @@ -120,6 +129,14 @@ class ProgressIndicator {
|
| String _header(String header) => header;
|
|
|
| void _printFailureOutput(TestCase test) {
|
| + var failureOutput = _buildFailureOutput(test);
|
| + for (var line in failureOutput) {
|
| + print(line);
|
| + }
|
| + _failureSummary.addAll(failureOutput);
|
| + }
|
| +
|
| + List<String> _buildFailureOutput(TestCase test) {
|
| List<String> output = new List<String>();
|
| output.add('');
|
| output.add(_header('FAILED: ${test.configurationString}'
|
| @@ -170,10 +187,7 @@ class ProgressIndicator {
|
| ? "Command line" : "Compilation command");
|
| output.add('$message: ${c.commandLine}');
|
| }
|
| - for (String line in output) {
|
| - print(line);
|
| - }
|
| - _failureSummary.addAll(output);
|
| + return output;
|
| }
|
|
|
| void _printFailureSummary() {
|
| @@ -196,6 +210,13 @@ class ProgressIndicator {
|
| }
|
| }
|
|
|
| + void _appendToFlakyFile(String msg) {
|
| + var file = new File(TestUtils.flakyFileName());
|
| + var fd = file.openSync(FileMode.APPEND);
|
| + fd.writeStringSync(msg);
|
| + fd.closeSync();
|
| + }
|
| +
|
| int get numFailedTests => _failedTests;
|
|
|
| int _completedTests() => _passedTests + _failedTests;
|
|
|