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

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

Issue 9378028: test.dart progress bar: a small tweak when --report is not used. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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("test_runner.dart"); 8 #import("test_runner.dart");
9 #import("test_suite.dart"); 9 #import("test_suite.dart");
10 10
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 if (_failedTests > 0) { 208 if (_failedTests > 0) {
209 // We may have printed many failure logs, so reprint the summary data. 209 // We may have printed many failure logs, so reprint the summary data.
210 _printProgress(); 210 _printProgress();
211 print(''); 211 print('');
212 } 212 }
213 stdout.close(); 213 stdout.close();
214 exit(_failedTests > 0 ? 1 : 0); 214 exit(_failedTests > 0 ? 1 : 0);
215 } 215 }
216 216
217 void allTestsKnown() { 217 void allTestsKnown() {
218 if (!_allTestsKnown) { 218 if (!_allTestsKnown && SummaryReport.total > 0) {
219 // Clear progress indicator before printing summary report. 219 // Clear progress indicator before printing summary report.
220 stdout.write( 220 stdout.write(
221 '\r \r'.charCodes()); 221 '\r \r'.charCodes());
222 SummaryReport.printReport(); 222 SummaryReport.printReport();
223 } 223 }
224 _allTestsKnown = true; 224 _allTestsKnown = true;
225 } 225 }
226 226
227 void _printStartProgress(TestCase test) => _printProgress(); 227 void _printStartProgress(TestCase test) => _printProgress();
228 void _printDoneProgress(TestCase test) => _printProgress(); 228 void _printDoneProgress(TestCase test) => _printProgress();
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 var status = 'pass'; 341 var status = 'pass';
342 if (test.output.unexpectedOutput) { 342 if (test.output.unexpectedOutput) {
343 status = 'fail'; 343 status = 'fail';
344 } 344 }
345 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); 345 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString();
346 print('Done ${test.configurationString} ${test.displayName}: $status'); 346 print('Done ${test.configurationString} ${test.displayName}: $status');
347 print('@@@STEP_CLEAR@@@'); 347 print('@@@STEP_CLEAR@@@');
348 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); 348 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@');
349 } 349 }
350 } 350 }
OLDNEW
« 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