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

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

Issue 24989004: Let test-runner wait for stdout & stderr when running tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 2151352c894b6780e98a6b5963fc6b33f2ccfb18..b93c3ded81b21e9304d1674231de225354a8ef46 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -1362,9 +1362,10 @@ class RunningProcess {
process.kill();
}
}
- process.exitCode.then(_commandComplete);
- _drainStream(process.stdout, stdout);
- _drainStream(process.stderr, stderr);
+ Future.wait([process.exitCode,
+ _drainStream(process.stdout, stdout),
+ _drainStream(process.stderr, stderr)])
+ .then((values) => _commandComplete(values[0]));
timeoutTimer = new Timer(new Duration(seconds: timeout),
timeoutHandler);
}).catchError((e) {
@@ -1399,8 +1400,8 @@ class RunningProcess {
return commandOutput;
}
- void _drainStream(Stream<List<int>> source, List<int> destination) {
- source.listen(destination.addAll);
+ Future _drainStream(Stream<List<int>> source, List<int> destination) {
+ return source.listen(destination.addAll).asFuture();
}
Map<String, String> _createProcessEnvironment() {
« 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