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

Unified Diff: runtime/observatory/tests/service/test_helper.dart

Issue 1099663002: Reapply "Add tests for evalutating against activation records." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | « runtime/observatory/tests/service/service.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/test_helper.dart
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index 34b7a431c2f83bedc8836385ae842d9de325d3e5..661e4755a024fa74decf53c9fc939ca7648dff5a 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -23,6 +23,7 @@ const String _TESTEE_MODE_FLAG = "--testee-mode";
class _TestLauncher {
Process process;
final List<String> args;
+ bool killedByTester = false;
_TestLauncher() : args = ['--enable-vm-service:0',
Platform.script.toFilePath(),
@@ -68,6 +69,9 @@ class _TestLauncher {
print(line);
});
process.exitCode.then((exitCode) {
+ if ((exitCode != 0) && !killedByTester) {
+ throw "Testee exited with $exitCode";
+ }
print("** Process exited");
});
return completer.future;
@@ -76,7 +80,9 @@ class _TestLauncher {
void requestExit() {
print('** Killing script');
- process.kill();
+ if (process.kill()) {
+ killedByTester = true;
+ }
}
}
@@ -118,6 +124,7 @@ void runIsolateTests(List<String> mainArgs,
return test(isolate);
})).then((_) => process.requestExit());
}, onError: (e, st) {
+ process.requestExit();
if (!_isWebSocketDisconnect(e)) {
print('Unexpected exception in service tests: $e $st');
throw e;
@@ -178,6 +185,7 @@ Future runVMTests(List<String> mainArgs,
return test(vm);
})).then((_) => process.requestExit());
}, onError: (e, st) {
+ process.requestExit();
if (!_isWebSocketDisconnect(e)) {
print('Unexpected exception in service tests: $e $st');
throw e;
« no previous file with comments | « runtime/observatory/tests/service/service.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698