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

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

Issue 9475038: test.dart: add support for compiling multiple scripts for a single test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 years, 9 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 | tools/testing/dart/test_runner.dart » ('j') | 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 output.add(s); 131 output.add(s);
132 } 132 }
133 } 133 }
134 if (!test.output.stderr.isEmpty()) { 134 if (!test.output.stderr.isEmpty()) {
135 output.add(''); 135 output.add('');
136 output.add('stderr:'); 136 output.add('stderr:');
137 for (var s in test.output.stderr) { 137 for (var s in test.output.stderr) {
138 output.add(s); 138 output.add(s);
139 } 139 }
140 } 140 }
141 if (test is BrowserTestCase && test.dynamic.compilerPath != null) { 141 for (Command c in test.commands) {
142 output.add(''); 142 output.add('');
143 output.add('Compilation command: ${test.dynamic.compilerPath} ' + 143 String message = (c == test.commands.last()
144 Strings.join(test.dynamic.compilerArguments, ' ')); 144 ? "Command line" : "Compilation command");
145 output.add('$message: ${c.commandLine}');
145 } 146 }
146 output.add('');
147 output.add('Command line: ${test.commandLine}');
148
149 for (String line in output) { 147 for (String line in output) {
150 print(line); 148 print(line);
151 } 149 }
152 _failureSummary.addAll(output); 150 _failureSummary.addAll(output);
153 } 151 }
154 152
155 void _printFailureSummary() { 153 void _printFailureSummary() {
156 for (String line in _failureSummary) { 154 for (String line in _failureSummary) {
157 print(line); 155 print(line);
158 } 156 }
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 // Clear progress indicator before printing summary report. 219 // Clear progress indicator before printing summary report.
222 stdout.write( 220 stdout.write(
223 '\r \r'.charCodes()); 221 '\r \r'.charCodes());
224 SummaryReport.printReport(); 222 SummaryReport.printReport();
225 } 223 }
226 _allTestsKnown = true; 224 _allTestsKnown = true;
227 } 225 }
228 226
229 void _printStartProgress(TestCase test) => _printProgress(); 227 void _printStartProgress(TestCase test) => _printProgress();
230 void _printDoneProgress(TestCase test) => _printProgress(); 228 void _printDoneProgress(TestCase test) => _printProgress();
231 229
232 abstract void _printProgress(); 230 abstract void _printProgress();
233 } 231 }
234 232
235 233
236 class CompactProgressIndicator extends CompactIndicator { 234 class CompactProgressIndicator extends CompactIndicator {
237 CompactProgressIndicator(Date startTime, bool printTiming) 235 CompactProgressIndicator(Date startTime, bool printTiming)
238 : super(startTime, printTiming); 236 : super(startTime, printTiming);
239 237
240 void _printProgress() { 238 void _printProgress() {
241 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); 239 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString();
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 var status = 'pass'; 341 var status = 'pass';
344 if (test.output.unexpectedOutput) { 342 if (test.output.unexpectedOutput) {
345 status = 'fail'; 343 status = 'fail';
346 } 344 }
347 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString(); 345 var percent = ((_completedTests() / _foundTests) * 100).toInt().toString();
348 print('Done ${test.configurationString} ${test.displayName}: $status'); 346 print('Done ${test.configurationString} ${test.displayName}: $status');
349 print('@@@STEP_CLEAR@@@'); 347 print('@@@STEP_CLEAR@@@');
350 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@'); 348 print('@@@STEP_TEXT@ $percent% +$_passedTests -$_failedTests @@@');
351 } 349 }
352 } 350 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698