Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This file is the entrypoint of the dart test suite. This suite is used | 7 * This file is the entrypoint of the dart test suite. This suite is used |
| 8 * to test: | 8 * to test: |
| 9 * | 9 * |
| 10 * 1. the dart vm | 10 * 1. the dart vm |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 print(output_words.join(' ')); | 125 print(output_words.join(' ')); |
| 126 } | 126 } |
| 127 | 127 |
| 128 var runningBrowserTests = configurations.any((config) { | 128 var runningBrowserTests = configurations.any((config) { |
| 129 return TestUtils.isBrowserRuntime(config['runtime']); | 129 return TestUtils.isBrowserRuntime(config['runtime']); |
| 130 }); | 130 }); |
| 131 | 131 |
| 132 List<Future> serverFutures = []; | 132 List<Future> serverFutures = []; |
| 133 var testSuites = new List<TestSuite>(); | 133 var testSuites = new List<TestSuite>(); |
| 134 var maxBrowserProcesses = maxProcesses; | 134 var maxBrowserProcesses = maxProcesses; |
| 135 for (var conf in configurations) { | 135 for (var conf in configurations) { |
|
kustermann
2013/10/25 15:35:01
Please add an assertion before this loop, that if
zra
2013/10/25 16:19:36
Done.
| |
| 136 Map<String, RegExp> selectors = conf['selectors']; | 136 Map<String, RegExp> selectors = conf['selectors']; |
| 137 var useContentSecurityPolicy = conf['csp']; | 137 var useContentSecurityPolicy = conf['csp']; |
| 138 if (!listTests && runningBrowserTests) { | 138 if (!listTests && runningBrowserTests) { |
| 139 // Start global http servers that serve the entire dart repo. | 139 // Start global http servers that serve the entire dart repo. |
| 140 // The http server is available on window.location.port, and a second | 140 // The http server is available on window.location.port, and a second |
| 141 // server for cross-domain tests can be found by calling | 141 // server for cross-domain tests can be found by calling |
| 142 // getCrossOriginPortNumber(). | 142 // getCrossOriginPortNumber(). |
| 143 var servers = new TestingServers(new Path(TestUtils.buildDir(conf)), | 143 var servers = new TestingServers(new Path(TestUtils.buildDir(conf)), |
| 144 useContentSecurityPolicy, | 144 useContentSecurityPolicy, |
| 145 conf['runtime']); | 145 conf['runtime']); |
| 146 serverFutures.add(servers.startServers(conf['local_ip'])); | 146 serverFutures.add(servers.startServers(conf['local_ip'], |
| 147 port: conf['test_server_port'], | |
| 148 crossOriginPort: conf['test_server_cross_origin_port'])); | |
| 147 conf['_servers_'] = servers; | 149 conf['_servers_'] = servers; |
| 148 if (verbose) { | 150 if (verbose) { |
| 149 serverFutures.last.then((_) { | 151 serverFutures.last.then((_) { |
| 150 var commandline = servers.httpServerCommandline(); | 152 var commandline = servers.httpServerCommandline(); |
| 151 print('Started HttpServers: $commandline'); | 153 print('Started HttpServers: $commandline'); |
| 152 }); | 154 }); |
| 153 } | 155 } |
| 154 } | 156 } |
| 155 | 157 |
| 156 if (conf['runtime'].startsWith('ie')) { | 158 if (conf['runtime'].startsWith('ie')) { |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 281 void main() { | 283 void main() { |
| 282 deleteTemporaryDartDirectories().then((_) { | 284 deleteTemporaryDartDirectories().then((_) { |
| 283 var optionsParser = new TestOptionsParser(); | 285 var optionsParser = new TestOptionsParser(); |
| 284 var configurations = optionsParser.parse(new Options().arguments); | 286 var configurations = optionsParser.parse(new Options().arguments); |
| 285 if (configurations != null && configurations.length > 0) { | 287 if (configurations != null && configurations.length > 0) { |
| 286 testConfigurations(configurations); | 288 testConfigurations(configurations); |
| 287 } | 289 } |
| 288 }); | 290 }); |
| 289 } | 291 } |
| 290 | 292 |
| OLD | NEW |