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

Unified Diff: utils/testrunner/standard_test_runner.dart

Issue 27215002: Very simple version of Isolates. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 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 | « utils/testrunner/run_pipeline.dart ('k') | utils/testrunner/testrunner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/testrunner/standard_test_runner.dart
diff --git a/utils/testrunner/standard_test_runner.dart b/utils/testrunner/standard_test_runner.dart
index 7429259d5a8a5d58717491bc673e04c1851bf5c1..cb39ff286e02cae7d55289d57c0f4d438203fc21 100644
--- a/utils/testrunner/standard_test_runner.dart
+++ b/utils/testrunner/standard_test_runner.dart
@@ -204,21 +204,21 @@ class TestRunnerChildConfiguration extends SimpleConfiguration {
}
var parentPort;
-runChildTest() {
- port.receive((testName, sendport) {
- parentPort = sendport;
- unittestConfiguration = new TestRunnerChildConfiguration();
- groupSep = marker;
- group('', test.main);
- filterTests(testName);
- runTests();
- });
+runChildTest(message) {
+ var testName = message[0];
+ parentPort = message[1];
+ unittestConfiguration = new TestRunnerChildConfiguration();
+ groupSep = marker;
+ group('', test.main);
+ filterTests(testName);
+ runTests();
}
isolatedTestParentWrapper(testCase) => () {
- SendPort childPort = spawnFunction(runChildTest);
- var f = childPort.call(testCase.description);
- f.then((results) {
+ ReceivePort response = new ReceivePort();
+ return Isolate.spawn(runChildTest, [testCase.description, response.sendPort])
+ .then((_) => response.first)
+ .then((results) {
var result = results[0];
var duration = new Duration(milliseconds: results[1]);
var message = results[2];
@@ -229,7 +229,6 @@ isolatedTestParentWrapper(testCase) => () {
testCase.error(message, stack);
}
});
- return f;
};
runIsolateTests() {
« no previous file with comments | « utils/testrunner/run_pipeline.dart ('k') | utils/testrunner/testrunner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698