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

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

Issue 11586012: Call DumpRenderTree directly from test.dart instead of using the drt-trampoline.py indirection (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years 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') | tools/testing/dart/test_runner.dart » ('J')
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 import "status_file_parser.dart"; 10 import "status_file_parser.dart";
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 String _header(String header) => header; 142 String _header(String header) => header;
143 143
144 void _printFailureOutput(TestCase test) { 144 void _printFailureOutput(TestCase test) {
145 var failureOutput = _buildFailureOutput(test); 145 var failureOutput = _buildFailureOutput(test);
146 for (var line in failureOutput) { 146 for (var line in failureOutput) {
147 print(line); 147 print(line);
148 } 148 }
149 _failureSummary.addAll(failureOutput); 149 _failureSummary.addAll(failureOutput);
150 } 150 }
151 151
152 List<String> _buildFailureOutput(TestCase test) { 152 List<String> _buildFailureOutput(TestCase test) {
153 List<String> output = new List<String>(); 153 List<String> output = new List<String>();
154 output.add(''); 154 output.add('');
155 output.add(_header('FAILED: ${test.configurationString}' 155 output.add(_header('FAILED: ${test.configurationString}'
156 ' ${test.displayName}')); 156 ' ${test.displayName}'));
157 StringBuffer expected = new StringBuffer(); 157 StringBuffer expected = new StringBuffer();
158 expected.add('Expected: '); 158 expected.add('Expected: ');
159 for (var expectation in test.expectedOutcomes) { 159 for (var expectation in test.expectedOutcomes) {
160 expected.add('$expectation '); 160 expected.add('$expectation ');
161 } 161 }
(...skipping 14 matching lines...) Expand all
176 if (!test.lastCommandOutput.diagnostics.isEmpty) { 176 if (!test.lastCommandOutput.diagnostics.isEmpty) {
177 String prefix = 'diagnostics:'; 177 String prefix = 'diagnostics:';
178 for (var s in test.lastCommandOutput.diagnostics) { 178 for (var s in test.lastCommandOutput.diagnostics) {
179 output.add('$prefix ${s}'); 179 output.add('$prefix ${s}');
180 prefix = ' '; 180 prefix = ' ';
181 } 181 }
182 } 182 }
183 if (!test.lastCommandOutput.stdout.isEmpty) { 183 if (!test.lastCommandOutput.stdout.isEmpty) {
184 output.add(''); 184 output.add('');
185 output.add('stdout:'); 185 output.add('stdout:');
186 for (var s in test.lastCommandOutput.stdout) { 186 if (test.lastCommandOutput.command.isPixelTest) {
187 output.add(s); 187 output.add('DRT pixel test failed! stdout is not printed because it '
188 'contains binary data!');
189 } else {
190 output.add(new String.fromCharCodes(test.lastCommandOutput.stdout));
188 } 191 }
189 } 192 }
190 if (!test.lastCommandOutput.stderr.isEmpty) { 193 if (!test.lastCommandOutput.stderr.isEmpty) {
191 output.add(''); 194 output.add('');
192 output.add('stderr:'); 195 output.add('stderr:');
193 for (var s in test.lastCommandOutput.stderr) { 196 output.add(new String.fromCharCodes(test.lastCommandOutput.stderr));
194 output.add(s);
195 }
196 } 197 }
197 for (Command c in test.commands) { 198 for (Command c in test.commands) {
198 output.add(''); 199 output.add('');
199 String message = (c == test.commands.last 200 String message = (c == test.commands.last
200 ? "Command line" : "Compilation command"); 201 ? "Command line" : "Compilation command");
201 output.add('$message: ${c.commandLine}'); 202 output.add('$message: ${c.commandLine}');
202 } 203 }
203 return output; 204 return output;
204 } 205 }
205 206
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 print(''); 478 print('');
478 print('$config:'); 479 print('$config:');
479 statuses.sort((a, b) => a.compareTo(b)); 480 statuses.sort((a, b) => a.compareTo(b));
480 for (String status in statuses) { 481 for (String status in statuses) {
481 print(' $status'); 482 print(' $status');
482 } 483 }
483 }); 484 });
484 _printStatus(); 485 _printStatus();
485 } 486 }
486 } 487 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | tools/testing/dart/test_runner.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698