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

Side by Side Diff: tools/testing/dart/test_progress.dart

Issue 11962042: Added DebugLogger to testing scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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:io"; 7 import "dart:io";
8 import "http_server.dart" as http_server; 8 import "http_server.dart" as http_server;
9 import "status_file_parser.dart"; 9 import "status_file_parser.dart";
10 import "test_runner.dart"; 10 import "test_runner.dart";
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 print('${duration} - $configuration $name'); 101 print('${duration} - $configuration $name');
102 } 102 }
103 } 103 }
104 } 104 }
105 105
106 void allDone() { 106 void allDone() {
107 _printFailureSummary(); 107 _printFailureSummary();
108 _printStatus(); 108 _printStatus();
109 _printSkippedCompilationInfo(); 109 _printSkippedCompilationInfo();
110 _printTimingInformation(); 110 _printTimingInformation();
111 DebugLogger.close();
ricow1 2013/01/17 17:07:38 I don't think this is the right place to do this (
kustermann 2013/01/17 17:33:17 Done.
111 stdout.close(); 112 stdout.close();
112 stderr.close(); 113 stderr.close();
113 if (_failedTests > 0) exit(1); 114 if (_failedTests > 0) exit(1);
114 } 115 }
115 116
116 void _printStartProgress(TestCase test) {} 117 void _printStartProgress(TestCase test) {}
117 void _printDoneProgress(TestCase test) {} 118 void _printDoneProgress(TestCase test) {}
118 119
119 String _pad(String s, int length) { 120 String _pad(String s, int length) {
120 StringBuffer buffer = new StringBuffer(); 121 StringBuffer buffer = new StringBuffer();
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 262
262 class SilentProgressIndicator extends ProgressIndicator { 263 class SilentProgressIndicator extends ProgressIndicator {
263 SilentProgressIndicator(Date startTime, bool printTiming) 264 SilentProgressIndicator(Date startTime, bool printTiming)
264 : super(startTime, printTiming); 265 : super(startTime, printTiming);
265 void testAdded() { } 266 void testAdded() { }
266 void start(TestCase test) { } 267 void start(TestCase test) { }
267 void done(TestCase test) { } 268 void done(TestCase test) { }
268 void _printStartProgress(TestCase test) { } 269 void _printStartProgress(TestCase test) { }
269 void _printDoneProgress(TestCase test) { } 270 void _printDoneProgress(TestCase test) { }
270 void allTestsKnown() { } 271 void allTestsKnown() { }
271 void allDone() { } 272 void allDone() {
273 DebugLogger.close();
274 }
272 } 275 }
273 276
274 abstract class CompactIndicator extends ProgressIndicator { 277 abstract class CompactIndicator extends ProgressIndicator {
275 CompactIndicator(Date startTime, bool printTiming) 278 CompactIndicator(Date startTime, bool printTiming)
276 : super(startTime, printTiming); 279 : super(startTime, printTiming);
277 280
278 void allDone() { 281 void allDone() {
279 stdout.write('\n'.charCodes); 282 stdout.write('\n'.charCodes);
280 _printFailureSummary(); 283 _printFailureSummary();
281 _printSkippedCompilationInfo(); 284 _printSkippedCompilationInfo();
282 _printTimingInformation(); 285 _printTimingInformation();
283 if (_failedTests > 0) { 286 if (_failedTests > 0) {
284 // We may have printed many failure logs, so reprint the summary data. 287 // We may have printed many failure logs, so reprint the summary data.
285 _printProgress(); 288 _printProgress();
286 print(''); 289 print('');
287 } 290 }
291 DebugLogger.close();
288 stdout.close(); 292 stdout.close();
289 stderr.close(); 293 stderr.close();
290 if (_failedTests > 0) exit(1); 294 if (_failedTests > 0) exit(1);
291 } 295 }
292 296
293 void allTestsKnown() { 297 void allTestsKnown() {
294 if (!_allTestsKnown && SummaryReport.total > 0) { 298 if (!_allTestsKnown && SummaryReport.total > 0) {
295 // Clear progress indicator before printing summary report. 299 // Clear progress indicator before printing summary report.
296 stdout.write( 300 stdout.write(
297 '\r \r'.charCodes); 301 '\r \r'.charCodes);
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 print(''); 494 print('');
491 print('$config:'); 495 print('$config:');
492 statuses.sort((a, b) => a.compareTo(b)); 496 statuses.sort((a, b) => a.compareTo(b));
493 for (String status in statuses) { 497 for (String status in statuses) {
494 print(' $status'); 498 print(' $status');
495 } 499 }
496 }); 500 });
497 _printStatus(); 501 _printStatus();
498 } 502 }
499 } 503 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698