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

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

Issue 12728005: Bugfix in test_progress.dart after refactoring (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 | « no previous file | 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 08983669e676210601fcaa83709162b2a1cb8d83..ca6e1112c22cfe14974a64b362c40f9c50d4896a 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -312,35 +312,17 @@ class LineProgressIndicator extends EventListener {
}
class TestFailurePrinter extends EventListener {
- var _failureSummary = <String>[];
var _formatter;
TestFailurePrinter([this._formatter = const Formatter()]);
void done(TestCase test) {
if (test.lastCommandOutput.unexpectedOutput) {
- _printFailureOutput(test);
- }
- }
-
- void allDone() {
- _printFailureSummary();
- }
-
- void _printFailureOutput(TestCase test) {
- var failureOutput = _buildFailureOutput(test, _formatter);
- for (var line in failureOutput) {
- print(line);
- }
- print('');
- _failureSummary.addAll(failureOutput);
- }
-
- void _printFailureSummary() {
- for (String line in _failureSummary) {
- print(line);
+ for (var line in _buildFailureOutput(test, _formatter)) {
+ print(line);
+ }
+ print('');
}
- print('');
}
}
@@ -480,9 +462,17 @@ class VerboseProgressIndicator extends ProgressIndicator {
class BuildbotProgressIndicator extends ProgressIndicator {
static String stepName;
+ var _failureSummary = <String>[];
BuildbotProgressIndicator(Date startTime) : super(startTime);
+ void done(TestCase test) {
+ super.done(test);
+ if (test.lastCommandOutput.unexpectedOutput) {
+ _failureSummary.addAll(_buildFailureOutput(test));
+ }
+ }
+
void _printDoneProgress(TestCase test) {
var status = 'pass';
if (test.lastCommandOutput.unexpectedOutput) {
@@ -495,9 +485,13 @@ class BuildbotProgressIndicator extends ProgressIndicator {
}
void allDone() {
- if (_failedTests > 0) {
+ if (!_failureSummary.isEmpty && stepName != null) {
print('@@@STEP_FAILURE@@@');
print('@@@BUILD_STEP $stepName failures@@@');
+ for (String line in _failureSummary) {
+ print(line);
+ }
+ print('');
}
super.allDone();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698