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

Unified Diff: runtime/observatory/test/test_helper.dart

Issue 1035943005: Clean up observatory testing processes when we are done with them. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: runtime/observatory/test/test_helper.dart
diff --git a/runtime/observatory/test/test_helper.dart b/runtime/observatory/test/test_helper.dart
index aa3c2a0db41cd66f65213dc24612832f3ae63013..8d80a6c4e9f056399212e5fa181d0372663e5495 100644
--- a/runtime/observatory/test/test_helper.dart
+++ b/runtime/observatory/test/test_helper.dart
@@ -61,15 +61,15 @@ class _TestLauncher {
print(line);
});
process.exitCode.then((exitCode) {
- expect(exitCode, equals(0));
+ print("** Process exited");
});
return completer.future;
});
}
void requestExit() {
- print('** Requesting script to exit.');
- process.stdin.add([32, 13, 10]);
+ print('** Killing script');
+ process.kill();
}
}
@@ -93,8 +93,10 @@ void runIsolateTests(List<String> mainArgs,
if (testeeConcurrent != null) {
testeeConcurrent();
}
- // Wait until signaled from spawning test.
- stdin.first.then((_) => exit(0));
+ // Wait around for the process to be killed.
+ stdin.first.then((_) {
+ exit(0);
+ });
} else {
var process = new _TestLauncher();
process.launch(pause_on_exit).then((port) {
@@ -108,7 +110,7 @@ void runIsolateTests(List<String> mainArgs,
print('Running $name [$testIndex/$totalTests]');
testIndex++;
return test(isolate);
- })).then((_) => exit(0));
+ })).then((_) => process.requestExit());
});
}
}
@@ -147,7 +149,7 @@ Future runVMTests(List<String> mainArgs,
if (testeeConcurrent != null) {
await testeeConcurrent();
}
- // Wait until signaled from spawning test.
+ // Wait around for the process to be killed.
stdin.first.then((_) => exit(0));
} else {
var process = new _TestLauncher();
@@ -161,7 +163,7 @@ Future runVMTests(List<String> mainArgs,
print('Running $name [$testIndex/$totalTests]');
testIndex++;
return test(vm);
- })).then((_) => exit(0));
+ })).then((_) => process.requestExit());
});
}
-}
+}
« runtime/bin/vmservice/vmservice_io.dart ('K') | « runtime/bin/vmservice/vmservice_io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698