Chromium Code Reviews| Index: tools/testing/dart/test_progress.dart |
| diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart |
| index 528d921b4f72c2e6d0098af577b8c5ee1e86c47e..7cd78ac9fdec19e3d684c0f03ec1035729a66c07 100644 |
| --- a/tools/testing/dart/test_progress.dart |
| +++ b/tools/testing/dart/test_progress.dart |
| @@ -46,7 +46,7 @@ class ProgressIndicator { |
| } |
| void done(TestCase test) { |
| - if (test.isFlaky && test.output.result != PASS) { |
| + if (test.isFlaky && test.lastCommandOutput.result != PASS) { |
| var buf = new StringBuffer(); |
| for (var l in _buildFailureOutput(test)) { |
| buf.add("$l\n"); |
| @@ -54,7 +54,7 @@ class ProgressIndicator { |
| _appendToFlakyFile(buf.toString()); |
| } |
| - if (test.output.unexpectedOutput) { |
| + if (test.lastCommandOutput.unexpectedOutput) { |
| _failedTests++; |
| _printFailureOutput(test); |
| } else { |
| @@ -76,13 +76,13 @@ class ProgressIndicator { |
| Duration d = (new Date.now()).difference(_startTime); |
| print('\n--- Total time: ${_timeString(d)} ---'); |
| _tests.sort((a, b) { |
|
ricow1
2012/11/16 10:36:56
add a todo here, we should take all the commands i
kustermann
2012/11/16 11:14:25
Done.
|
| - Duration aDuration = a.output.time; |
| - Duration bDuration = b.output.time; |
| + Duration aDuration = a.lastCommandOutput.time; |
| + Duration bDuration = b.lastCommandOutput.time; |
| return bDuration.inMilliseconds - aDuration.inMilliseconds; |
| }); |
| for (int i = 0; i < 20 && i < _tests.length; i++) { |
| var name = _tests[i].displayName; |
| - var duration = _tests[i].output.time; |
| + var duration = _tests[i].lastCommandOutput.time; |
| var configuration = _tests[i].configurationString; |
| print('${duration} - $configuration $name'); |
| } |
| @@ -147,9 +147,9 @@ class ProgressIndicator { |
| expected.add('$expectation '); |
| } |
| output.add(expected.toString()); |
| - output.add('Actual: ${test.output.result}'); |
| - if (!test.output.hasTimedOut && test.info != null) { |
| - if (test.output.incomplete && !test.info.hasCompileError) { |
| + output.add('Actual: ${test.lastCommandOutput.result}'); |
| + if (!test.lastCommandOutput.hasTimedOut && test.info != null) { |
| + if (test.lastCommandOutput.incomplete && !test.info.hasCompileError) { |
| output.add('Unexpected compile-time error.'); |
| } else { |
| if (test.info.hasCompileError) { |
| @@ -160,24 +160,24 @@ class ProgressIndicator { |
| } |
| } |
| } |
| - if (!test.output.diagnostics.isEmpty) { |
| + if (!test.lastCommandOutput.diagnostics.isEmpty) { |
| String prefix = 'diagnostics:'; |
| - for (var s in test.output.diagnostics) { |
| + for (var s in test.lastCommandOutput.diagnostics) { |
| output.add('$prefix ${s}'); |
| prefix = ' '; |
| } |
| } |
| - if (!test.output.stdout.isEmpty) { |
| + if (!test.lastCommandOutput.stdout.isEmpty) { |
| output.add(''); |
| output.add('stdout:'); |
| - for (var s in test.output.stdout) { |
| + for (var s in test.lastCommandOutput.stdout) { |
| output.add(s); |
| } |
| } |
| - if (!test.output.stderr.isEmpty) { |
| + if (!test.lastCommandOutput.stderr.isEmpty) { |
| output.add(''); |
| output.add('stderr:'); |
| - for (var s in test.output.stderr) { |
| + for (var s in test.lastCommandOutput.stderr) { |
| output.add(s); |
| } |
| } |
| @@ -347,7 +347,7 @@ class LineProgressIndicator extends ProgressIndicator { |
| void _printDoneProgress(TestCase test) { |
| var status = 'pass'; |
| - if (test.output.unexpectedOutput) { |
| + if (test.lastCommandOutput.unexpectedOutput) { |
| status = 'fail'; |
| } |
| print('Done ${test.configurationString} ${test.displayName}: $status'); |
| @@ -365,7 +365,7 @@ class VerboseProgressIndicator extends ProgressIndicator { |
| void _printDoneProgress(TestCase test) { |
| var status = 'pass'; |
| - if (test.output.unexpectedOutput) { |
| + if (test.lastCommandOutput.unexpectedOutput) { |
| status = 'fail'; |
| } |
| print('Done ${test.configurationString} ${test.displayName}: $status'); |
| @@ -396,7 +396,7 @@ class BuildbotProgressIndicator extends ProgressIndicator { |
| void _printDoneProgress(TestCase test) { |
| var status = 'pass'; |
| - if (test.output.unexpectedOutput) { |
| + if (test.lastCommandOutput.unexpectedOutput) { |
| status = 'fail'; |
| } |
| var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); |
| @@ -421,11 +421,11 @@ class DiffProgressIndicator extends ColorProgressIndicator { |
| : super(startTime, printTiming); |
| void _printFailureOutput(TestCase test) { |
| - String status = '${test.displayName}: ${test.output.result}'; |
| + String status = '${test.displayName}: ${test.lastCommandOutput.result}'; |
| List<String> configs = |
| statusToConfigs.putIfAbsent(status, () => <String>[]); |
| configs.add(test.configurationString); |
| - if (test.output.hasTimedOut) { |
| + if (test.lastCommandOutput.hasTimedOut) { |
| print('\n${test.displayName} timed out on ${test.configurationString}'); |
| } |
| } |