| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library test_progress; | 5 library test_progress; |
| 6 | 6 |
| 7 import "dart:async"; | 7 import "dart:async"; |
| 8 import "dart:io"; | 8 import "dart:io"; |
| 9 import "dart:io" as io; | 9 import "dart:io" as io; |
| 10 import "dart:convert" show JSON; | 10 import "dart:convert" show JSON; |
| 11 import "path.dart"; | 11 import "path.dart"; |
| 12 import "status_file_parser.dart"; | 12 import "status_file_parser.dart"; |
| 13 import "summary_report.dart"; |
| 13 import "test_runner.dart"; | 14 import "test_runner.dart"; |
| 14 import "test_suite.dart"; | 15 import "test_suite.dart"; |
| 15 import "utils.dart"; | 16 import "utils.dart"; |
| 16 | 17 |
| 17 String _pad(String s, int length) { | 18 String _pad(String s, int length) { |
| 18 StringBuffer buffer = new StringBuffer(); | 19 StringBuffer buffer = new StringBuffer(); |
| 19 for (int i = s.length; i < length; i++) { | 20 for (int i = s.length; i < length; i++) { |
| 20 buffer.write(' '); | 21 buffer.write(' '); |
| 21 } | 22 } |
| 22 buffer.write(s); | 23 buffer.write(s); |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 "$dir"); | 302 "$dir"); |
| 302 } | 303 } |
| 303 } | 304 } |
| 304 } | 305 } |
| 305 } | 306 } |
| 306 } | 307 } |
| 307 | 308 |
| 308 | 309 |
| 309 class SummaryPrinter extends EventListener { | 310 class SummaryPrinter extends EventListener { |
| 310 void allTestsKnown() { | 311 void allTestsKnown() { |
| 311 if (SummaryReport.total > 0) { | 312 if (summaryReport.total > 0) { |
| 312 SummaryReport.printReport(); | 313 summaryReport.printReport(); |
| 313 } | 314 } |
| 314 } | 315 } |
| 315 } | 316 } |
| 316 | 317 |
| 317 | 318 |
| 318 class TimingPrinter extends EventListener { | 319 class TimingPrinter extends EventListener { |
| 319 final _command2testCases = new Map<Command, List<TestCase>>(); | 320 final _command2testCases = new Map<Command, List<TestCase>>(); |
| 320 final _commandOutputs = new Set<CommandOutput>(); | 321 final _commandOutputs = new Set<CommandOutput>(); |
| 321 DateTime _startTime; | 322 DateTime _startTime; |
| 322 | 323 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 return new VerboseProgressIndicator(startTime); | 662 return new VerboseProgressIndicator(startTime); |
| 662 case 'status': | 663 case 'status': |
| 663 return new ProgressIndicator(startTime); | 664 return new ProgressIndicator(startTime); |
| 664 case 'buildbot': | 665 case 'buildbot': |
| 665 return new BuildbotProgressIndicator(startTime); | 666 return new BuildbotProgressIndicator(startTime); |
| 666 default: | 667 default: |
| 667 assert(false); | 668 assert(false); |
| 668 break; | 669 break; |
| 669 } | 670 } |
| 670 } | 671 } |
| OLD | NEW |