Index: tools/test-runtime.dart |
diff --git a/tools/test-runtime.dart b/tools/test-runtime.dart |
index ab95538e954536cee962b03781ea378ee19232e6..ec1a45062962d51df61a9aed35b7fa0e12f9c17a 100755 |
--- a/tools/test-runtime.dart |
+++ b/tools/test-runtime.dart |
@@ -14,6 +14,7 @@ |
#import("testing/dart/test_runner.dart"); |
#import("testing/dart/test_options.dart"); |
#import("testing/dart/test_suite.dart"); |
+#import("testing/dart/http_server.dart"); |
#import("../tests/co19/test_config.dart"); |
#import("../runtime/tests/vm/test_config.dart"); |
@@ -66,10 +67,8 @@ main() { |
} |
var configurationIterator = configurations.iterator(); |
- bool enqueueConfiguration(ProcessQueue queue) { |
- if (!configurationIterator.hasNext()) { |
- return false; |
- } |
+ void enqueueConfiguration(ProcessQueue queue) { |
+ if (!configurationIterator.hasNext()) return; |
var conf = configurationIterator.next(); |
if (selectors.containsKey('co19')) { |
@@ -88,16 +87,21 @@ main() { |
new StandardTestSuite.forDirectory(conf, testSuiteDir)); |
} |
} |
- |
- return true; |
} |
+ // Start global http server that serves the entire dart repo. |
+ // The http server is available on localhost:9876 for any |
+ // test that needs to load resources from the repo over http. |
+ startHttpServer('127.0.0.1', 9876); |
+ |
// Start process queue. |
- var queue = new ProcessQueue(maxProcesses, |
- progressIndicator, |
- startTime, |
- printTiming, |
- enqueueConfiguration, |
- verbose, |
- listTests); |
+ new ProcessQueue( |
+ maxProcesses, |
+ progressIndicator, |
+ startTime, |
+ printTiming, |
+ enqueueConfiguration, |
+ () => terminateHttpServer(), |
+ verbose, |
+ listTests); |
} |