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

Unified Diff: tools/testing/dart/test_progress.dart

Issue 12902035: Added --failure-summary option to test.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_progress.dart
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index 20a6646285df63d51dd3690deaed6af4f125c88e..72da366264ced51be095c34a7d0d2d625c0ec6a3 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -314,16 +314,36 @@ class LineProgressIndicator extends EventListener {
}
class TestFailurePrinter extends EventListener {
+ bool _printSummary;
var _formatter;
+ var _failureSummary = <String>[];
- TestFailurePrinter([this._formatter = const Formatter()]);
+ TestFailurePrinter(this._printSummary,
+ [this._formatter = const Formatter()]);
void done(TestCase test) {
if (test.lastCommandOutput.unexpectedOutput) {
- for (var line in _buildFailureOutput(test, _formatter)) {
+ var lines = _buildFailureOutput(test, _formatter);
+ for (var line in lines) {
print(line);
}
print('');
+ if (_printSummary) {
+ _failureSummary.addAll(lines);
+ _failureSummary.add('');
+ }
+ }
+ }
+
+ void allDone() {
+ if (_printSummary) {
+ print('\n=== Failure summary:\n');
+ if (!_failureSummary.isEmpty) {
+ for (String line in _failureSummary) {
+ print(line);
+ }
+ print('');
+ }
}
}
}
@@ -406,7 +426,6 @@ abstract class CompactIndicator extends ProgressIndicator {
: super(startTime);
void allDone() {
- stdout.writeln('');
if (_failedTests > 0) {
// We may have printed many failure logs, so reprint the summary data.
_printProgress();
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698