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

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

Issue 28533003: Capture and report stdout/stderr of the browser while running a test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index d817a9e466ebba9b96855703dc2247b1be216a3e..e84ee23c5d3b81911c59b1077e0e6abc00b2d22e 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -17,11 +17,9 @@ import "dart:convert" show LineSplitter, UTF8;
// We need to use the 'io' prefix here, otherwise io.exitCode will shadow
// CommandOutput.exitCode in subclasses of CommandOutput.
import "dart:io" as io;
-import "dart:isolate";
import "dart:math" as math;
import 'dependency_graph.dart' as dgraph;
import "browser_controller.dart";
-import "http_server.dart" as http_server;
import "status_file_parser.dart";
import "test_progress.dart";
import "test_suite.dart";
@@ -1994,25 +1992,30 @@ class CommandExecutorImpl implements CommandExecutor {
BrowserTestCommand browserCommand, int timeout) {
var completer = new Completer<CommandOutput>();
- var callback = (output, delayUntilTestStarted, duration) {
- bool timedOut = output == "TIMEOUT";
+ var callback = (BrowserTestOutput output) {
+ bool timedOut = output.didTimeout;
String stderr = "";
if (timedOut) {
- if (delayUntilTestStarted != null) {
- stderr = "This test timed out. The delay until the test was actually "
- "started was: $delayUntilTestStarted.";
+ if (output.delayUntilTestStarted != null) {
+ stderr = "This test timed out. The delay until the test actually "
+ "started was: ${output.delayUntilTestStarted}.";
} else {
stderr = "This test has not notified test.py that it started running."
" This could be a bug in test.py! "
"Please contact ricow/kustermann";
}
}
+ stderr = [stderr, '',
+ 'BrowserOutput while running the test (this may be incorrect):',
+ 'BrowserOutput.stdout:', output.browserOutput.stdout.toString(),
+ 'BrowserOutput.stderr:', output.browserOutput.stderr.toString()]
+ .join('\n');
var commandOutput = createCommandOutput(browserCommand,
0,
timedOut,
- encodeUtf8(output),
+ encodeUtf8(output.dom),
encodeUtf8(stderr),
- duration,
+ output.duration,
false);
completer.complete(commandOutput);
};
« tools/testing/dart/browser_controller.dart ('K') | « tools/testing/dart/browser_controller.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698