mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 04:57:43 +00:00
Bugfix in test_progress.dart after refactoring
TBR=ricow Review URL: https://codereview.chromium.org//12728005 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19881 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
65718c56df
commit
4924f73340
|
@ -312,36 +312,18 @@ 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);
|
||||
for (var line in _buildFailureOutput(test, _formatter)) {
|
||||
print(line);
|
||||
}
|
||||
print('');
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
print('');
|
||||
}
|
||||
}
|
||||
|
||||
class ProgressIndicator extends EventListener {
|
||||
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue