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

Unified Diff: tools/test.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
« no previous file with comments | « pkg/pkg.status ('k') | tools/test-runtime.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test.dart
diff --git a/tools/test.dart b/tools/test.dart
index 7786037b9f0e210cc7053b30c4ddb997078f6ada..22aca2c2de6d14af23612bf23e5effd1a7e6771f 100755
--- a/tools/test.dart
+++ b/tools/test.dart
@@ -29,6 +29,7 @@
#import("testing/dart/test_options.dart");
#import("testing/dart/test_suite.dart");
#import("testing/dart/test_progress.dart");
+#import("testing/dart/http_server.dart");
#import("../compiler/tests/dartc/test_config.dart");
#import("../runtime/tests/vm/test_config.dart");
@@ -97,10 +98,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();
for (String key in selectors.getKeys()) {
@@ -123,16 +122,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);
Ivan Posva 2012/10/30 21:27:04 How is this supposed to work when two people on th
+
// Start process queue.
- var queue = new ProcessQueue(maxProcesses,
- progressIndicator,
- startTime,
- printTiming,
- enqueueConfiguration,
- verbose,
- listTests);
+ new ProcessQueue(
+ maxProcesses,
+ progressIndicator,
+ startTime,
+ printTiming,
+ enqueueConfiguration,
+ () => terminateHttpServer(),
+ verbose,
+ listTests);
}
« no previous file with comments | « pkg/pkg.status ('k') | tools/test-runtime.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698