| 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 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 // Extract global options from first configuration. | 30 // Extract global options from first configuration. |
| 31 var firstConf = configurations[0]; | 31 var firstConf = configurations[0]; |
| 32 Map<String, RegExp> selectors = firstConf['selectors']; | 32 Map<String, RegExp> selectors = firstConf['selectors']; |
| 33 var maxProcesses = firstConf['tasks']; | 33 var maxProcesses = firstConf['tasks']; |
| 34 var progressIndicator = firstConf['progress']; | 34 var progressIndicator = firstConf['progress']; |
| 35 var verbose = firstConf['verbose']; | 35 var verbose = firstConf['verbose']; |
| 36 var printTiming = firstConf['time']; | 36 var printTiming = firstConf['time']; |
| 37 var listTests = firstConf['list']; | 37 var listTests = firstConf['list']; |
| 38 var keepGeneratedTests = firstConf['keep-generated-tests']; | 38 var keepGeneratedTests = firstConf['keep-generated-tests']; |
| 39 | 39 |
| 40 // Print the configurations being run by this execution of |
| 41 // test.dart. However, don't do it if the silent progress indicator |
| 42 // is used. This is only needed because of the junit tests. |
| 43 if (progressIndicator != 'silent') { |
| 44 StringBuffer sb = new StringBuffer('Test configuration'); |
| 45 sb.add(configurations.length > 1 ? 's:' : ':'); |
| 46 for (Map conf in configurations) { |
| 47 sb.add(' ${conf["component"]}_${conf["mode"]}_${conf["arch"]}'); |
| 48 if (conf['checked']) sb.add('_checked'); |
| 49 } |
| 50 print(sb); |
| 51 } |
| 52 |
| 40 var configurationIterator = configurations.iterator(); | 53 var configurationIterator = configurations.iterator(); |
| 41 bool enqueueConfiguration(ProcessQueue queue) { | 54 bool enqueueConfiguration(ProcessQueue queue) { |
| 42 if (!configurationIterator.hasNext()) { | 55 if (!configurationIterator.hasNext()) { |
| 43 return false; | 56 return false; |
| 44 } | 57 } |
| 45 | 58 |
| 46 var conf = configurationIterator.next(); | 59 var conf = configurationIterator.next(); |
| 47 if (selectors.containsKey('standalone')) { | 60 if (selectors.containsKey('standalone')) { |
| 48 queue.addTestSuite(new StandaloneTestSuite(conf)); | 61 queue.addTestSuite(new StandaloneTestSuite(conf)); |
| 49 } | 62 } |
| (...skipping 23 matching lines...) Expand all Loading... |
| 73 // Start process queue. | 86 // Start process queue. |
| 74 var queue = new ProcessQueue(maxProcesses, | 87 var queue = new ProcessQueue(maxProcesses, |
| 75 progressIndicator, | 88 progressIndicator, |
| 76 startTime, | 89 startTime, |
| 77 printTiming, | 90 printTiming, |
| 78 enqueueConfiguration, | 91 enqueueConfiguration, |
| 79 verbose, | 92 verbose, |
| 80 listTests, | 93 listTests, |
| 81 keepGeneratedTests); | 94 keepGeneratedTests); |
| 82 } | 95 } |
| OLD | NEW |