| 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 // TODO(ager): Get rid of this version of test.dart when we don't have | 6 // TODO(ager): Get rid of this version of test.dart when we don't have | 
| 7 // to worry about the special runtime checkout anymore. | 7 // to worry about the special runtime checkout anymore. | 
| 8 // This file is identical to test.dart with test suites in the | 8 // This file is identical to test.dart with test suites in the | 
| 9 // directories samples, client, compiler, frog, and utils removed. | 9 // directories samples, client, compiler, frog, and utils removed. | 
| 10 | 10 | 
| 11 #library("test"); | 11 #library("test"); | 
| 12 | 12 | 
| 13 #import("testing/dart/test_runner.dart"); | 13 #import("testing/dart/test_runner.dart"); | 
| 14 #import("testing/dart/test_options.dart"); | 14 #import("testing/dart/test_options.dart"); | 
| 15 #import("testing/dart/test_suite.dart"); | 15 #import("testing/dart/test_suite.dart"); | 
| 16 | 16 | 
| 17 #import("../tests/co19/test_config.dart"); | 17 #import("../tests/co19/test_config.dart"); | 
| 18 #import("../tests/standalone/test_config.dart"); |  | 
| 19 #import("../runtime/tests/vm/test_config.dart"); | 18 #import("../runtime/tests/vm/test_config.dart"); | 
| 20 | 19 | 
| 21 /** | 20 /** | 
| 22  * The directories that contain test suites which follow the conventions | 21  * The directories that contain test suites which follow the conventions | 
| 23  * required by [StandardTestSuite]'s forDirectory constructor. | 22  * required by [StandardTestSuite]'s forDirectory constructor. | 
| 24  * New test suites should follow this convention because it makes it much | 23  * New test suites should follow this convention because it makes it much | 
| 25  * simpler to add them to test.dart.  Existing test suites should be | 24  * simpler to add them to test.dart.  Existing test suites should be | 
| 26  * moved to here, if possible. | 25  * moved to here, if possible. | 
| 27 */ | 26 */ | 
| 28 final TEST_SUITE_DIRECTORIES = const [ | 27 final TEST_SUITE_DIRECTORIES = const [ | 
| 29   'tests/corelib', | 28   'tests/corelib', | 
| 30   'tests/isolate', | 29   'tests/isolate', | 
| 31   'tests/language', | 30   'tests/language', | 
| 32   'tests/lib', | 31   'tests/lib', | 
|  | 32   'tests/standalone', | 
| 33   'tests/utils', | 33   'tests/utils', | 
| 34 ]; | 34 ]; | 
| 35 | 35 | 
| 36 main() { | 36 main() { | 
| 37   var startTime = new Date.now(); | 37   var startTime = new Date.now(); | 
| 38   var optionsParser = new TestOptionsParser(); | 38   var optionsParser = new TestOptionsParser(); | 
| 39   List<Map> configurations = optionsParser.parse(new Options().arguments); | 39   List<Map> configurations = optionsParser.parse(new Options().arguments); | 
| 40   if (configurations == null) return; | 40   if (configurations == null) return; | 
| 41 | 41 | 
| 42   // Extract global options from first configuration. | 42   // Extract global options from first configuration. | 
| (...skipping 20 matching lines...) Expand all  Loading... | 
| 63     print(sb); | 63     print(sb); | 
| 64   } | 64   } | 
| 65 | 65 | 
| 66   var configurationIterator = configurations.iterator(); | 66   var configurationIterator = configurations.iterator(); | 
| 67   bool enqueueConfiguration(ProcessQueue queue) { | 67   bool enqueueConfiguration(ProcessQueue queue) { | 
| 68     if (!configurationIterator.hasNext()) { | 68     if (!configurationIterator.hasNext()) { | 
| 69       return false; | 69       return false; | 
| 70     } | 70     } | 
| 71 | 71 | 
| 72     var conf = configurationIterator.next(); | 72     var conf = configurationIterator.next(); | 
| 73     if (selectors.containsKey('standalone')) { |  | 
| 74       queue.addTestSuite(new StandaloneTestSuite(conf)); |  | 
| 75     } |  | 
| 76     if (selectors.containsKey('co19')) { | 73     if (selectors.containsKey('co19')) { | 
| 77       queue.addTestSuite(new Co19TestSuite(conf)); | 74       queue.addTestSuite(new Co19TestSuite(conf)); | 
| 78     } | 75     } | 
| 79     if (conf['runtime'] == 'vm' && selectors.containsKey('vm')) { | 76     if (conf['runtime'] == 'vm' && selectors.containsKey('vm')) { | 
| 80       queue.addTestSuite(new VMTestSuite(conf)); | 77       queue.addTestSuite(new VMTestSuite(conf)); | 
| 81       queue.addTestSuite(new VMDartTestSuite(conf)); | 78       queue.addTestSuite(new VMDartTestSuite(conf)); | 
| 82     } | 79     } | 
| 83 | 80 | 
| 84     for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { | 81     for (final testSuiteDir in TEST_SUITE_DIRECTORIES) { | 
| 85       final name = testSuiteDir.substring(testSuiteDir.lastIndexOf('/') + 1); | 82       final name = testSuiteDir.substring(testSuiteDir.lastIndexOf('/') + 1); | 
| 86       if (selectors.containsKey(name)) { | 83       if (selectors.containsKey(name)) { | 
| 87         queue.addTestSuite( | 84         queue.addTestSuite( | 
| 88             new StandardTestSuite.forDirectory(conf, testSuiteDir)); | 85             new StandardTestSuite.forDirectory(conf, testSuiteDir)); | 
| 89       } | 86       } | 
| 90     } | 87     } | 
| 91 | 88 | 
| 92     return true; | 89     return true; | 
| 93   } | 90   } | 
| 94 | 91 | 
| 95   // Start process queue. | 92   // Start process queue. | 
| 96   var queue = new ProcessQueue(maxProcesses, | 93   var queue = new ProcessQueue(maxProcesses, | 
| 97                                progressIndicator, | 94                                progressIndicator, | 
| 98                                startTime, | 95                                startTime, | 
| 99                                printTiming, | 96                                printTiming, | 
| 100                                enqueueConfiguration, | 97                                enqueueConfiguration, | 
| 101                                verbose, | 98                                verbose, | 
| 102                                listTests, | 99                                listTests, | 
| 103                                keepGeneratedTests); | 100                                keepGeneratedTests); | 
| 104 } | 101 } | 
| OLD | NEW | 
|---|