| 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 | 15 |
| 16 #import("../tests/co19/test_config.dart"); | 16 #import("../tests/co19/test_config.dart"); |
| 17 #import("../tests/corelib/test_config.dart"); | 17 #import("../tests/corelib/test_config.dart"); |
| 18 #import("../tests/isolate/test_config.dart"); | 18 #import("../tests/isolate/test_config.dart"); |
| 19 #import("../tests/language/test_config.dart"); | 19 #import("../tests/language/test_config.dart"); |
| 20 #import("../tests/standalone/test_config.dart"); | 20 #import("../tests/standalone/test_config.dart"); |
| 21 #import("../tests/utils/test_config.dart"); | 21 #import("../tests/utils/test_config.dart"); |
| 22 #import("../runtime/tests/vm/test_config.dart"); | 22 #import("../runtime/tests/vm/test_config.dart"); |
| 23 | 23 |
| 24 main() { | 24 main() { |
| 25 var startTime = new Date.now(); | 25 var startTime = new Date.now(); |
| 26 var optionsParser = new TestOptionsParser(); | 26 var optionsParser = new TestOptionsParser(); |
| 27 List<Map> configurations = optionsParser.parse(new Options().arguments); | 27 List<Map> configurations = optionsParser.parse(new Options().arguments); |
| 28 if (configurations == null) return; | 28 if (configurations == null) return; |
| 29 | 29 |
| 30 // Print the configurations being run by this excution of test.dart. | |
| 31 StringBuffer sb = new StringBuffer('Test configuration'); | |
| 32 sb.add(configurations.length > 1 ? 's:' : ':'); | |
| 33 for (Map conf in configurations) { | |
| 34 sb.add(' ${conf["component"]}_${conf["mode"]}_${conf["arch"]}'); | |
| 35 if (conf['checked']) sb.add('_checked'); | |
| 36 } | |
| 37 print(sb); | |
| 38 | |
| 39 // Extract global options from first configuration. | 30 // Extract global options from first configuration. |
| 40 var firstConf = configurations[0]; | 31 var firstConf = configurations[0]; |
| 41 Map<String, RegExp> selectors = firstConf['selectors']; | 32 Map<String, RegExp> selectors = firstConf['selectors']; |
| 42 var maxProcesses = firstConf['tasks']; | 33 var maxProcesses = firstConf['tasks']; |
| 43 var progressIndicator = firstConf['progress']; | 34 var progressIndicator = firstConf['progress']; |
| 44 var verbose = firstConf['verbose']; | 35 var verbose = firstConf['verbose']; |
| 45 var printTiming = firstConf['time']; | 36 var printTiming = firstConf['time']; |
| 46 var listTests = firstConf['list']; | 37 var listTests = firstConf['list']; |
| 47 var keepGeneratedTests = firstConf['keep-generated-tests']; | 38 var keepGeneratedTests = firstConf['keep-generated-tests']; |
| 48 | 39 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 // Start process queue. | 73 // Start process queue. |
| 83 var queue = new ProcessQueue(maxProcesses, | 74 var queue = new ProcessQueue(maxProcesses, |
| 84 progressIndicator, | 75 progressIndicator, |
| 85 startTime, | 76 startTime, |
| 86 printTiming, | 77 printTiming, |
| 87 enqueueConfiguration, | 78 enqueueConfiguration, |
| 88 verbose, | 79 verbose, |
| 89 listTests, | 80 listTests, |
| 90 keepGeneratedTests); | 81 keepGeneratedTests); |
| 91 } | 82 } |
| OLD | NEW |