| 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 #library("test"); | 6 #library("test"); |
| 7 | 7 |
| 8 #import("testing/dart/test_runner.dart"); | 8 #import("testing/dart/test_runner.dart"); |
| 9 #import("testing/dart/test_options.dart"); | 9 #import("testing/dart/test_options.dart"); |
| 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('samples')) { | 60 if (selectors.containsKey('samples')) { |
| 48 queue.addTestSuite(new SamplesTestSuite(conf)); | 61 queue.addTestSuite(new SamplesTestSuite(conf)); |
| 49 } | 62 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // Start process queue. | 94 // Start process queue. |
| 82 var queue = new ProcessQueue(maxProcesses, | 95 var queue = new ProcessQueue(maxProcesses, |
| 83 progressIndicator, | 96 progressIndicator, |
| 84 startTime, | 97 startTime, |
| 85 printTiming, | 98 printTiming, |
| 86 enqueueConfiguration, | 99 enqueueConfiguration, |
| 87 verbose, | 100 verbose, |
| 88 listTests, | 101 listTests, |
| 89 keepGeneratedTests); | 102 keepGeneratedTests); |
| 90 } | 103 } |
| OLD | NEW |