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

Unified Diff: tools/testing/dart/test_progress.dart

Issue 15740034: Print output of all commands if a testcase failed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_progress.dart
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index b9ce10b496d5494114451dd4c12fb33b9127d730..f105505b6f4c9a62bbcc4d67ad6fd29859522eb4 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -90,40 +90,46 @@ List<String> _buildFailureOutput(TestCase test,
}
}
}
- if (!test.lastCommandOutput.diagnostics.isEmpty) {
- String prefix = 'diagnostics:';
- for (var s in test.lastCommandOutput.diagnostics) {
- output.add('$prefix ${s}');
- prefix = ' ';
- }
- }
- if (!test.lastCommandOutput.stdout.isEmpty) {
- output.add('');
- output.add('stdout:');
- if (test.lastCommandOutput.command.isPixelTest) {
- output.add('DRT pixel test failed! stdout is not printed because it '
- 'contains binary data!');
- } else {
- output.addAll(
- getLinesWithoutCarriageReturn(test.lastCommandOutput.stdout));
+ for (var i = 0; i < test.commands.length; i++) {
+ var command = test.commands[i];
+ var commandOutput = test.commandOutputs[command];
+ if (commandOutput != null) {
+ output.add("CommandOutput[$i]:");
kustermann 2013/05/30 13:03:34 Do we want to print this always or just if there w
ricow1 2013/05/30 13:14:10 Always
+ if (!commandOutput.diagnostics.isEmpty) {
+ String prefix = 'diagnostics:';
+ for (var s in commandOutput.diagnostics) {
+ output.add('$prefix ${s}');
+ prefix = ' ';
+ }
+ }
+ if (!commandOutput.stdout.isEmpty) {
+ output.add('');
+ output.add('stdout:');
+ if (command.isPixelTest) {
+ output.add('DRT pixel test failed! stdout is not printed because it '
+ 'contains binary data!');
+ } else {
+ output.addAll(getLinesWithoutCarriageReturn(commandOutput.stdout));
+ }
+ }
+ if (!commandOutput.stderr.isEmpty) {
+ output.add('');
+ output.add('stderr:');
+ output.addAll(getLinesWithoutCarriageReturn(commandOutput.stderr));
+ }
}
}
- if (!test.lastCommandOutput.stderr.isEmpty) {
- output.add('');
- output.add('stderr:');
- output.addAll(getLinesWithoutCarriageReturn(test.lastCommandOutput.stderr));
- }
if (test is BrowserTestCase) {
// Additional command for rerunning the steps locally after the fact.
var command =
test.configuration["_servers_"].httpServerCommandline();
+ output.add('');
output.add('To retest, run: $command');
}
- for (Command c in test.commands) {
+ for (var i = 0; i < test.commands.length; i++) {
+ var command = test.commands[i];
output.add('');
- String message = (c == test.commands.last
- ? "Command line" : "Compilation command");
- output.add('$message: $c');
+ output.add('Command[$i]: $command');
}
return output;
}
« 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