| 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 |
| 11 * 2. the frog compiler (compiles dart to js) | 11 * 2. the frog compiler (compiles dart to js) |
| 12 * 3. the leg compiler (also compiles dart to js) | 12 * 3. the leg compiler (also compiles dart to js) |
| 13 * 4. the dartc static analyzer | 13 * 4. the dartc static analyzer |
| 14 * 5. the dart core library | 14 * 5. the dart core library |
| 15 * 6. other standard dart libraries (DOM bindings, ui libraries, | 15 * 6. other standard dart libraries (DOM bindings, ui libraries, |
| 16 * io libraries etc.) | 16 * io libraries etc.) |
| 17 * | 17 * |
| 18 * This script is normally invoked by test.py. (test.py finds the dart vm | 18 * This script is normally invoked by test.py. (test.py finds the dart vm |
| 19 * and passses along all command line arguments to this script.) | 19 * and passses along all command line arguments to this script.) |
| 20 * | 20 * |
| 21 * The command line args of this script are documented in | 21 * The command line args of this script are documented in |
| 22 * "tools/testing/test_options.dart". | 22 * "tools/testing/test_options.dart". |
| 23 * | 23 * |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #library("test"); | 26 #library("test"); |
| 27 | 27 |
| 28 #import("dart:io"); |
| 28 #import("testing/dart/test_runner.dart"); | 29 #import("testing/dart/test_runner.dart"); |
| 29 #import("testing/dart/test_options.dart"); | 30 #import("testing/dart/test_options.dart"); |
| 30 #import("testing/dart/test_suite.dart"); | 31 #import("testing/dart/test_suite.dart"); |
| 31 | 32 |
| 32 #import("../compiler/tests/dartc/test_config.dart"); | 33 #import("../compiler/tests/dartc/test_config.dart"); |
| 33 #import("../runtime/tests/vm/test_config.dart"); | 34 #import("../runtime/tests/vm/test_config.dart"); |
| 34 #import("../samples/tests/dartc/test_config.dart"); | 35 #import("../samples/tests/dartc/test_config.dart"); |
| 35 #import("../tests/co19/test_config.dart"); | 36 #import("../tests/co19/test_config.dart"); |
| 36 | 37 |
| 37 /** | 38 /** |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // vm tests contain both cc tests (added here) and dart tests (added in | 109 // vm tests contain both cc tests (added here) and dart tests (added in |
| 109 // [TEST_SUITE_DIRECTORIES]). | 110 // [TEST_SUITE_DIRECTORIES]). |
| 110 queue.addTestSuite(new VMTestSuite(conf)); | 111 queue.addTestSuite(new VMTestSuite(conf)); |
| 111 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { | 112 } else if (conf['compiler'] == 'dartc' && key == 'dartc') { |
| 112 queue.addTestSuite(new SamplesDartcTestSuite(conf)); | 113 queue.addTestSuite(new SamplesDartcTestSuite(conf)); |
| 113 queue.addTestSuite(new JUnitDartcTestSuite(conf)); | 114 queue.addTestSuite(new JUnitDartcTestSuite(conf)); |
| 114 } | 115 } |
| 115 } | 116 } |
| 116 | 117 |
| 117 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { | 118 for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { |
| 118 final name = testSuiteDir.substring(testSuiteDir.lastIndexOf('/') + 1); | 119 Path testSuitePath = new Path(testSuiteDir); |
| 120 final name = testSuitePath.filename; |
| 119 if (selectors.containsKey(name)) { | 121 if (selectors.containsKey(name)) { |
| 120 queue.addTestSuite( | 122 queue.addTestSuite( |
| 121 new StandardTestSuite.forDirectory(conf, testSuiteDir)); | 123 new StandardTestSuite.forDirectory(conf, testSuitePath)); |
| 122 } | 124 } |
| 123 } | 125 } |
| 124 | 126 |
| 125 return true; | 127 return true; |
| 126 } | 128 } |
| 127 | 129 |
| 128 // Start process queue. | 130 // Start process queue. |
| 129 var queue = new ProcessQueue(maxProcesses, | 131 var queue = new ProcessQueue(maxProcesses, |
| 130 progressIndicator, | 132 progressIndicator, |
| 131 startTime, | 133 startTime, |
| 132 printTiming, | 134 printTiming, |
| 133 enqueueConfiguration, | 135 enqueueConfiguration, |
| 134 verbose, | 136 verbose, |
| 135 listTests); | 137 listTests); |
| 136 } | 138 } |
| OLD | NEW |