Index: tools/test.dart |
diff --git a/tools/test.dart b/tools/test.dart |
index 8d7388c0a2e29a4b6d4e39133614263e7575d189..b058aeff8529b508a9b161f7349f713ba8883362 100755 |
--- a/tools/test.dart |
+++ b/tools/test.dart |
@@ -81,7 +81,7 @@ main() { |
var verbose = firstConf['verbose']; |
var printTiming = firstConf['time']; |
var listTests = firstConf['list']; |
- |
+ |
if (!firstConf['append_flaky_log']) { |
var file = new File(TestUtils.flakyFileName()); |
if (file.existsSync()) { |
@@ -131,15 +131,22 @@ main() { |
} |
} |
- // Start global http server that serves the entire dart repo. |
- // The http server is available on localhost:9876 for any |
+ // Start global http servers that serve the entire dart repo. |
+ // The http server is available on localhost:9876 and localhost:5432 for any |
// test that needs to load resources from the repo over http. |
+ List serverList = []; |
if (!listTests) { |
// Only start the server if we are running browser tests. |
var runningBrowserTests = configurations.some((config) { |
return TestUtils.isBrowserRuntime(config['runtime']); |
}); |
- if (runningBrowserTests) startHttpServer('127.0.0.1', 9876); |
+ if (runningBrowserTests) { |
+ serverList.add( |
+ startHttpServer('127.0.0.1', SERVER_PORT_ONE, SERVER_PORT_TWO)); |
Mads Ager (google)
2013/01/02 10:09:50
Instead of passing in two ports here, we could ret
Emily Fortuna
2013/01/04 00:51:03
Done.
|
+ // We start two servers so that we can test cross-domain tests. |
+ serverList.add( |
+ startHttpServer('127.0.0.1', SERVER_PORT_TWO, SERVER_PORT_ONE)); |
+ } |
} |
// Start process queue. |
@@ -148,7 +155,7 @@ main() { |
startTime, |
printTiming, |
enqueueConfiguration, |
- () => terminateHttpServer(), |
+ () => terminateHttpServers(serverList), |
verbose, |
listTests); |
} |