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

Unified Diff: lib/src/runner/vm/isolate_listener.dart

Issue 1056733002: Run test tearDowns and clean up temporary directories when a signal is caught. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 9 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/reporter/compact.dart ('k') | lib/src/runner/vm/isolate_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/vm/isolate_listener.dart
diff --git a/lib/src/runner/vm/isolate_listener.dart b/lib/src/runner/vm/isolate_listener.dart
index c0e7c09c7fcf2f6fbb797479816a0134cf7b86d1..46c05f2592c70c8e09abdd8a61609a80ec76da1e 100644
--- a/lib/src/runner/vm/isolate_listener.dart
+++ b/lib/src/runner/vm/isolate_listener.dart
@@ -97,6 +97,15 @@ class IsolateListener {
void _runTest(Test test, SendPort sendPort) {
var liveTest = test.load(_suite);
+ var receivePort = new ReceivePort();
+ sendPort.send({"type": "started", "reply": receivePort.sendPort});
+
+ receivePort.listen((message) {
+ assert(message['command'] == 'close');
+ receivePort.close();
+ liveTest.close();
+ });
+
liveTest.onStateChange.listen((state) {
sendPort.send({
"type": "state-change",
« no previous file with comments | « lib/src/runner/reporter/compact.dart ('k') | lib/src/runner/vm/isolate_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698