| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 } | 135 } |
| 136 | 136 |
| 137 // There should not be more than one InternetExplorerDriver instance | 137 // There should not be more than one InternetExplorerDriver instance |
| 138 // running at a time. For details, see | 138 // running at a time. For details, see |
| 139 // http://code.google.com/p/selenium/wiki/InternetExplorerDriver. | 139 // http://code.google.com/p/selenium/wiki/InternetExplorerDriver. |
| 140 if (conf['runtime'].startsWith('ie')) { | 140 if (conf['runtime'].startsWith('ie')) { |
| 141 maxBrowserProcesses = 1; | 141 maxBrowserProcesses = 1; |
| 142 } | 142 } |
| 143 | 143 |
| 144 for (String key in selectors.keys) { | 144 for (String key in selectors.keys) { |
| 145 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { |
| 146 final name = testSuiteDir.filename; |
| 147 if (selectors.containsKey(name)) { |
| 148 testSuites.add( |
| 149 new StandardTestSuite.forDirectory(conf, testSuiteDir)); |
| 150 } |
| 151 } |
| 152 |
| 145 if (key == 'co19') { | 153 if (key == 'co19') { |
| 146 testSuites.add(new Co19TestSuite(conf)); | 154 testSuites.add(new Co19TestSuite(conf)); |
| 147 } else if (conf['runtime'] == 'vm' && key == 'vm') { | 155 } else if (conf['runtime'] == 'vm' && key == 'vm') { |
| 148 // vm tests contain both cc tests (added here) and dart tests (added in | 156 // vm tests contain both cc tests (added here) and dart tests (added in |
| 149 // [TEST_SUITE_DIRECTORIES]). | 157 // [TEST_SUITE_DIRECTORIES]). |
| 150 testSuites.add(new VMTestSuite(conf)); | 158 testSuites.add(new VMTestSuite(conf)); |
| 151 } else if (conf['analyzer']) { | 159 } else if (conf['analyzer']) { |
| 152 if (key == 'dartc' && conf['compiler'] == 'dartc') { | 160 if (key == 'dartc' && conf['compiler'] == 'dartc') { |
| 153 testSuites.add(new JUnitDartcTestSuite(conf)); | 161 testSuites.add(new JUnitDartcTestSuite(conf)); |
| 154 } | 162 } |
| 155 // TODO(devoncarew): get these running with the new analyzer | 163 // TODO(devoncarew): get these running with the new analyzer |
| 156 if (key == 'dartc' && conf['compiler'] == 'dartc') { | 164 if (key == 'dartc' && conf['compiler'] == 'dartc') { |
| 157 testSuites.add(new SamplesDartcTestSuite(conf)); | 165 testSuites.add(new SamplesDartcTestSuite(conf)); |
| 158 } | 166 } |
| 159 if (key == 'analyze_library') { | 167 if (key == 'analyze_library') { |
| 160 testSuites.add(new AnalyzeLibraryTestSuite(conf)); | 168 testSuites.add(new AnalyzeLibraryTestSuite(conf)); |
| 161 } | 169 } |
| 162 if (key == 'analyze_tests') { | 170 if (key == 'analyze_tests') { |
| 163 testSuites.add(new AnalyzeTestsTestSuite(conf)); | 171 testSuites.add(new AnalyzeTestsTestSuite(conf)); |
| 164 } | 172 } |
| 165 } | 173 } |
| 166 } | 174 } |
| 167 | |
| 168 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { | |
| 169 final name = testSuiteDir.filename; | |
| 170 if (selectors.containsKey(name)) { | |
| 171 testSuites.add( | |
| 172 new StandardTestSuite.forDirectory(conf, testSuiteDir)); | |
| 173 } | |
| 174 } | |
| 175 } | 175 } |
| 176 | 176 |
| 177 void allTestsFinished() { | 177 void allTestsFinished() { |
| 178 for (var conf in configurations) { | 178 for (var conf in configurations) { |
| 179 if (conf.containsKey('_servers_')) { | 179 if (conf.containsKey('_servers_')) { |
| 180 conf['_servers_'].stopServers(); | 180 conf['_servers_'].stopServers(); |
| 181 } | 181 } |
| 182 } | 182 } |
| 183 DebugLogger.close(); | 183 DebugLogger.close(); |
| 184 } | 184 } |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 void main() { | 277 void main() { |
| 278 deleteTemporaryDartDirectories().then((_) { | 278 deleteTemporaryDartDirectories().then((_) { |
| 279 var optionsParser = new TestOptionsParser(); | 279 var optionsParser = new TestOptionsParser(); |
| 280 var configurations = optionsParser.parse(new Options().arguments); | 280 var configurations = optionsParser.parse(new Options().arguments); |
| 281 if (configurations != null && configurations.length > 0) { | 281 if (configurations != null && configurations.length > 0) { |
| 282 testConfigurations(configurations); | 282 testConfigurations(configurations); |
| 283 } | 283 } |
| 284 }); | 284 }); |
| 285 } | 285 } |
| 286 | 286 |
| OLD | NEW |