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

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
« no previous file with comments | « runtime/bin/vmservice/vmservice_io.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..fd65d15847934e17cd2769e5a24c5e2ae146eaa4 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,7 +93,7 @@ void runIsolateTests(List<String> mainArgs,
if (testeeConcurrent != null) {
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();
@@ -108,7 +108,7 @@ void runIsolateTests(List<String> mainArgs,
print('Running $name [$testIndex/$totalTests]');
testIndex++;
return test(isolate);
- })).then((_) => exit(0));
+ })).then((_) => process.requestExit());
});
}
}
@@ -147,7 +147,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 +161,7 @@ Future runVMTests(List<String> mainArgs,
print('Running $name [$testIndex/$totalTests]');
testIndex++;
return test(vm);
- })).then((_) => exit(0));
+ })).then((_) => process.requestExit());
});
}
-}
+}
« no previous file with comments | « runtime/bin/vmservice/vmservice_io.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698