| 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 |
| 11 * 2. the dart2js compiler | 11 * 2. the dart2js compiler |
| 12 * 3. the dartc static analyzer | 12 * 3. the dartc static analyzer |
| 13 * 4. the dart core library | 13 * 4. the dart core library |
| 14 * 5. other standard dart libraries (DOM bindings, ui libraries, | 14 * 5. other standard dart libraries (DOM bindings, ui libraries, |
| 15 * io libraries etc.) | 15 * io libraries etc.) |
| 16 * | 16 * |
| 17 * This script is normally invoked by test.py. (test.py finds the dart vm | 17 * This script is normally invoked by test.py. (test.py finds the dart vm |
| 18 * and passses along all command line arguments to this script.) | 18 * and passses along all command line arguments to this script.) |
| 19 * | 19 * |
| 20 * The command line args of this script are documented in | 20 * The command line args of this script are documented in |
| 21 * "tools/testing/test_options.dart". | 21 * "tools/testing/test_options.dart". |
| 22 * | 22 * |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 library test; | 25 library test; |
| 26 | 26 |
| 27 import "dart:async"; | 27 import "dart:async"; |
| 28 import "dart:io"; | 28 import "dart:io"; |
| 29 import "dart:math" as math; |
| 29 import "testing/dart/http_server.dart"; | 30 import "testing/dart/http_server.dart"; |
| 30 import "testing/dart/record_and_replay.dart"; | 31 import "testing/dart/record_and_replay.dart"; |
| 31 import "testing/dart/test_options.dart"; | 32 import "testing/dart/test_options.dart"; |
| 32 import "testing/dart/test_progress.dart"; | 33 import "testing/dart/test_progress.dart"; |
| 33 import "testing/dart/test_runner.dart"; | 34 import "testing/dart/test_runner.dart"; |
| 34 import "testing/dart/test_suite.dart"; | 35 import "testing/dart/test_suite.dart"; |
| 35 import "testing/dart/utils.dart"; | 36 import "testing/dart/utils.dart"; |
| 36 | 37 |
| 37 import "../compiler/tests/dartc/test_config.dart"; | 38 import "../compiler/tests/dartc/test_config.dart"; |
| 38 import "../runtime/tests/vm/test_config.dart"; | 39 import "../runtime/tests/vm/test_config.dart"; |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 conf['runtime']); | 155 conf['runtime']); |
| 155 serverFutures.add(servers.startServers(conf['local_ip'])); | 156 serverFutures.add(servers.startServers(conf['local_ip'])); |
| 156 conf['_servers_'] = servers; | 157 conf['_servers_'] = servers; |
| 157 } | 158 } |
| 158 | 159 |
| 159 // There should not be more than one InternetExplorerDriver instance | 160 // There should not be more than one InternetExplorerDriver instance |
| 160 // running at a time. For details, see | 161 // running at a time. For details, see |
| 161 // http://code.google.com/p/selenium/wiki/InternetExplorerDriver. | 162 // http://code.google.com/p/selenium/wiki/InternetExplorerDriver. |
| 162 if (conf['runtime'].startsWith('ie')) { | 163 if (conf['runtime'].startsWith('ie')) { |
| 163 maxBrowserProcesses = 1; | 164 maxBrowserProcesses = 1; |
| 165 } else if (conf['runtime'].startsWith('safari') && |
| 166 conf['use_browser_controller']) { |
| 167 // FIXME(kustermann/ricow): Remove this once the new browser_controller is |
| 168 // stable. |
| 169 maxBrowserProcesses = math.max(maxProcesses - 2, 2); |
| 164 } | 170 } |
| 165 | 171 |
| 166 for (String key in selectors.keys) { | 172 for (String key in selectors.keys) { |
| 167 if (key == 'co19') { | 173 if (key == 'co19') { |
| 168 testSuites.add(new Co19TestSuite(conf)); | 174 testSuites.add(new Co19TestSuite(conf)); |
| 169 } else if (conf['runtime'] == 'vm' && key == 'vm') { | 175 } else if (conf['runtime'] == 'vm' && key == 'vm') { |
| 170 // vm tests contain both cc tests (added here) and dart tests (added | 176 // vm tests contain both cc tests (added here) and dart tests (added |
| 171 // in [TEST_SUITE_DIRECTORIES]). | 177 // in [TEST_SUITE_DIRECTORIES]). |
| 172 testSuites.add(new VMTestSuite(conf)); | 178 testSuites.add(new VMTestSuite(conf)); |
| 173 } else if (conf['analyzer']) { | 179 } else if (conf['analyzer']) { |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 void main() { | 308 void main() { |
| 303 deleteTemporaryDartDirectories().then((_) { | 309 deleteTemporaryDartDirectories().then((_) { |
| 304 var optionsParser = new TestOptionsParser(); | 310 var optionsParser = new TestOptionsParser(); |
| 305 var configurations = optionsParser.parse(new Options().arguments); | 311 var configurations = optionsParser.parse(new Options().arguments); |
| 306 if (configurations != null && configurations.length > 0) { | 312 if (configurations != null && configurations.length > 0) { |
| 307 testConfigurations(configurations); | 313 testConfigurations(configurations); |
| 308 } | 314 } |
| 309 }); | 315 }); |
| 310 } | 316 } |
| 311 | 317 |
| OLD | NEW |