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

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

Issue 11086019: Update test.dart to do the same on all platforms for tests run (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« no previous file with comments | « tools/testing/dart/test_progress.dart ('k') | 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 994110e65ebc076b0d46ead89780e4538b3134f3..4d8917b3dfa2e99ea71a636271e7b55686b6f71e 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -750,19 +750,21 @@ class BatchRunnerProcess {
Future terminate() {
if (_process == null) return new Future.immediate(true);
Completer completer = new Completer();
+ Timer killTimer;
_process.onExit = (exitCode) {
_process.close();
+ if (killTimer != null) killTimer.cancel();
completer.complete(true);
};
- if (_isWebDriver && Platform.operatingSystem == 'windows') {
+ if (_isWebDriver) {
// Use a graceful shutdown so our Selenium script can close
- // the open browser processes. TODO(jmesserly): Send a signal once
- // that's supported in Windows.
+ // the open browser processes. On Windows, signals do not exist
Jennifer Messerly 2012/10/09 17:54:56 I'm confused by this comment. See: http://msdn.mic
Emily Fortuna 2012/10/09 18:01:41 It does http://docs.python.org/library/subprocess.
+ // and a kill is a hard kill.
_process.stdin.write('--terminate\n'.charCodes());
// In case the run_selenium process didn't close, kill it after 30s
int shutdownMillisecs = 30000;
- new Timer(shutdownMillisecs, (e) { if (!closed) _process.kill(); });
+ killTimer = new Timer(shutdownMillisecs, (e) { _process.kill(); });
} else {
_process.kill();
}
« no previous file with comments | « tools/testing/dart/test_progress.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698