| OLD | NEW |
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2012, 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 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 #import("testing/dart/test_runner.dart"); | 28 #import("testing/dart/test_runner.dart"); |
| 29 #import("testing/dart/test_options.dart"); | 29 #import("testing/dart/test_options.dart"); |
| 30 #import("testing/dart/test_suite.dart"); | 30 #import("testing/dart/test_suite.dart"); |
| 31 | 31 |
| 32 #import("../client/tests/dartc/test_config.dart"); | 32 #import("../client/tests/dartc/test_config.dart"); |
| 33 #import("../compiler/tests/dartc/test_config.dart"); | 33 #import("../compiler/tests/dartc/test_config.dart"); |
| 34 #import("../frog/tests/await/test_config.dart"); | 34 #import("../frog/tests/await/test_config.dart"); |
| 35 #import("../runtime/tests/vm/test_config.dart"); | 35 #import("../runtime/tests/vm/test_config.dart"); |
| 36 #import("../tests/co19/test_config.dart"); | 36 #import("../tests/co19/test_config.dart"); |
| 37 #import("../tests/standalone/test_config.dart"); | |
| 38 | 37 |
| 39 /** | 38 /** |
| 40 * The directories that contain test suites which follow the conventions | 39 * The directories that contain test suites which follow the conventions |
| 41 * required by [StandardTestSuite]'s forDirectory constructor. | 40 * required by [StandardTestSuite]'s forDirectory constructor. |
| 42 * New test suites should follow this convention because it makes it much | 41 * New test suites should follow this convention because it makes it much |
| 43 * simpler to add them to test.dart. Existing test suites should be | 42 * simpler to add them to test.dart. Existing test suites should be |
| 44 * moved to here, if possible. | 43 * moved to here, if possible. |
| 45 */ | 44 */ |
| 46 final TEST_SUITE_DIRECTORIES = const [ | 45 final TEST_SUITE_DIRECTORIES = const [ |
| 47 'frog/tests/frog', | 46 'frog/tests/frog', |
| 48 'frog/tests/frog_native', | 47 'frog/tests/frog_native', |
| 49 'frog/tests/leg', | 48 'frog/tests/leg', |
| 50 'frog/tests/leg_only', | 49 'frog/tests/leg_only', |
| 51 'samples/tests/samples', | 50 'samples/tests/samples', |
| 52 'tests/benchmark_smoke', | 51 'tests/benchmark_smoke', |
| 53 'tests/corelib', | 52 'tests/corelib', |
| 54 'tests/dom', | 53 'tests/dom', |
| 55 'tests/html', | 54 'tests/html', |
| 56 'tests/isolate', | 55 'tests/isolate', |
| 57 'tests/json', | 56 'tests/json', |
| 58 'tests/language', | 57 'tests/language', |
| 59 'tests/lib', | 58 'tests/lib', |
| 59 'tests/standalone', |
| 60 'tests/utils', | 60 'tests/utils', |
| 61 'utils/tests/css', | 61 'utils/tests/css', |
| 62 'utils/tests/peg', | 62 'utils/tests/peg', |
| 63 'utils/tests/pub', | 63 'utils/tests/pub', |
| 64 ]; | 64 ]; |
| 65 | 65 |
| 66 main() { | 66 main() { |
| 67 var startTime = new Date.now(); | 67 var startTime = new Date.now(); |
| 68 var optionsParser = new TestOptionsParser(); | 68 var optionsParser = new TestOptionsParser(); |
| 69 List<Map> configurations = optionsParser.parse(new Options().arguments); | 69 List<Map> configurations = optionsParser.parse(new Options().arguments); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 94 } | 94 } |
| 95 | 95 |
| 96 var configurationIterator = configurations.iterator(); | 96 var configurationIterator = configurations.iterator(); |
| 97 bool enqueueConfiguration(ProcessQueue queue) { | 97 bool enqueueConfiguration(ProcessQueue queue) { |
| 98 if (!configurationIterator.hasNext()) { | 98 if (!configurationIterator.hasNext()) { |
| 99 return false; | 99 return false; |
| 100 } | 100 } |
| 101 | 101 |
| 102 var conf = configurationIterator.next(); | 102 var conf = configurationIterator.next(); |
| 103 for (String key in selectors.getKeys()) { | 103 for (String key in selectors.getKeys()) { |
| 104 if (key == 'standalone') { | 104 if (key == 'co19') { |
| 105 queue.addTestSuite(new StandaloneTestSuite(conf)); | |
| 106 } else if (key == 'co19') { | |
| 107 queue.addTestSuite(new Co19TestSuite(conf)); | 105 queue.addTestSuite(new Co19TestSuite(conf)); |
| 108 } else if (conf['runtime'] == 'vm' && key == 'vm') { | 106 } else if (conf['runtime'] == 'vm' && key == 'vm') { |
| 109 queue.addTestSuite(new VMTestSuite(conf)); | 107 queue.addTestSuite(new VMTestSuite(conf)); |
| 110 queue.addTestSuite(new VMDartTestSuite(conf)); | 108 queue.addTestSuite(new VMDartTestSuite(conf)); |
| 111 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { | 109 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { |
| 112 queue.addTestSuite(new ClientDartcTestSuite(conf)); | 110 queue.addTestSuite(new ClientDartcTestSuite(conf)); |
| 113 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { | 111 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { |
| 114 queue.addTestSuite(new JUnitDartcTestSuite(conf)); | 112 queue.addTestSuite(new JUnitDartcTestSuite(conf)); |
| 115 } else if (key == 'await') { | 113 } else if (key == 'await') { |
| 116 queue.addTestSuite(new AwaitTestSuite(conf)); | 114 queue.addTestSuite(new AwaitTestSuite(conf)); |
| (...skipping 14 matching lines...) Expand all Loading... |
| 131 // Start process queue. | 129 // Start process queue. |
| 132 var queue = new ProcessQueue(maxProcesses, | 130 var queue = new ProcessQueue(maxProcesses, |
| 133 progressIndicator, | 131 progressIndicator, |
| 134 startTime, | 132 startTime, |
| 135 printTiming, | 133 printTiming, |
| 136 enqueueConfiguration, | 134 enqueueConfiguration, |
| 137 verbose, | 135 verbose, |
| 138 listTests, | 136 listTests, |
| 139 keepGeneratedTests); | 137 keepGeneratedTests); |
| 140 } | 138 } |
| OLD | NEW |