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

Unified Diff: tools/test-runtime.dart

Issue 11035027: Add in-process http server to the dart test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address more comments. Created 8 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
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);
}
« tools/test.dart ('K') | « tools/test.dart ('k') | tools/testing/dart/http_server.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698