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

Unified Diff: test/io.dart

Issue 1657613003: Eagerly close browser tests. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 11 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 | « lib/src/runner/loader.dart ('k') | test/runner/signal_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/io.dart
diff --git a/test/io.dart b/test/io.dart
index cd4298b3d5406ac672dfec762f7e35cb207f74e4..b3477430c585a23c35eedcc94514d52b08fdc551 100644
--- a/test/io.dart
+++ b/test/io.dart
@@ -96,8 +96,12 @@ StreamMatcher containsInOrder(Iterable<String> strings) =>
inOrder(strings.map((string) => consumeThrough(contains(string))));
/// Runs the test executable with the package root set properly.
+///
+/// If [forwardStdio] is true, the standard output and error from the process
+/// will be printed as part of the parent test. This is used for debugging.
ScheduledProcess runTest(List args, {String reporter,
- int concurrency, Map<String, String> environment}) {
+ int concurrency, Map<String, String> environment,
+ bool forwardStdio: false}) {
reporter ??= "expanded";
concurrency ??= 1;
@@ -111,9 +115,16 @@ ScheduledProcess runTest(List args, {String reporter,
if (environment == null) environment = {};
environment.putIfAbsent("_UNITTEST_USE_COLOR", () => "false");
- return runDart(allArgs,
+ var process = runDart(allArgs,
environment: environment,
description: "dart bin/test.dart");
+
+ if (forwardStdio) {
+ process.stdoutStream().listen(print);
+ process.stderrStream().listen(print);
+ }
+
+ return process;
}
/// Runs Dart.
« no previous file with comments | « lib/src/runner/loader.dart ('k') | test/runner/signal_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698