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

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

Issue 10905208: Add --step_name option to test.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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
Index: dart/tools/testing/dart/test_progress.dart
diff --git a/dart/tools/testing/dart/test_progress.dart b/dart/tools/testing/dart/test_progress.dart
index 8066899209c7e1e3cad83f0a429642c4b0ca209c..ef058b10ee23b8462cd4c6d894bfa47f8fce997d 100644
--- a/dart/tools/testing/dart/test_progress.dart
+++ b/dart/tools/testing/dart/test_progress.dart
@@ -14,7 +14,8 @@ class ProgressIndicator {
factory ProgressIndicator.fromName(String name,
Date startTime,
- bool printTiming) {
+ bool printTiming,
+ String stepName) {
switch (name) {
case 'compact':
return new CompactProgressIndicator(startTime, printTiming);
@@ -29,7 +30,7 @@ class ProgressIndicator {
case 'status':
return new StatusProgressIndicator(startTime, printTiming);
case 'buildbot':
- return new BuildbotProgressIndicator(startTime, printTiming);
+ return new BuildbotProgressIndicator(startTime, printTiming, stepName);
default:
assert(false);
break;
@@ -340,7 +341,9 @@ class StatusProgressIndicator extends ProgressIndicator {
class BuildbotProgressIndicator extends ProgressIndicator {
- BuildbotProgressIndicator(Date startTime, bool printTiming)
+ final String stepName;
+
+ BuildbotProgressIndicator(Date startTime, bool printTiming, this.stepName)
: super(startTime, printTiming);
void _printStartProgress(TestCase test) {
@@ -359,15 +362,8 @@ class BuildbotProgressIndicator extends ProgressIndicator {
void _printFailureSummary() {
if (!_failureSummary.isEmpty()) {
- // We need to create a unique name for each step, otherwise, the
- // build bot will show the same failure when several steps
- // fail. We don't know the name of the current step as it is
- // printed by the program invoking this.
- // TODO(ahe): Pass in the step name as an option, and let
- // test.py take care of printing the steps.
- var name = 'failures ($_startTime)';
print('@@@STEP_FAILURE@@@');
- print('@@@BUILD_STEP $name@@@');
+ print('@@@BUILD_STEP $stepName failures@@@');
}
super._printFailureSummary();
}

Powered by Google App Engine
This is Rietveld 408576698