| OLD | NEW |
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, 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 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 new Path('sdk/lib/_internal/dartdoc'), | 71 new Path('sdk/lib/_internal/dartdoc'), |
| 72 ]; | 72 ]; |
| 73 | 73 |
| 74 void testConfigurations(List<Map> configurations) { | 74 void testConfigurations(List<Map> configurations) { |
| 75 var startTime = new DateTime.now(); | 75 var startTime = new DateTime.now(); |
| 76 // Extract global options from first configuration. | 76 // Extract global options from first configuration. |
| 77 var firstConf = configurations[0]; | 77 var firstConf = configurations[0]; |
| 78 Map<String, RegExp> selectors = firstConf['selectors']; | 78 Map<String, RegExp> selectors = firstConf['selectors']; |
| 79 var maxProcesses = firstConf['tasks']; | 79 var maxProcesses = firstConf['tasks']; |
| 80 var progressIndicator = firstConf['progress']; | 80 var progressIndicator = firstConf['progress']; |
| 81 var failureSummary = firstConf['failure-summary']; |
| 81 BuildbotProgressIndicator.stepName = firstConf['step_name']; | 82 BuildbotProgressIndicator.stepName = firstConf['step_name']; |
| 82 var verbose = firstConf['verbose']; | 83 var verbose = firstConf['verbose']; |
| 83 var printTiming = firstConf['time']; | 84 var printTiming = firstConf['time']; |
| 84 var listTests = firstConf['list']; | 85 var listTests = firstConf['list']; |
| 85 var useContentSecurityPolicy = firstConf['csp']; | 86 var useContentSecurityPolicy = firstConf['csp']; |
| 86 | 87 |
| 87 if (!firstConf['append_logs']) { | 88 if (!firstConf['append_logs']) { |
| 88 var file = new File(TestUtils.flakyFileName()); | 89 var file = new File(TestUtils.flakyFileName()); |
| 89 if (file.existsSync()) { | 90 if (file.existsSync()) { |
| 90 file.deleteSync(); | 91 file.deleteSync(); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 } | 185 } |
| 185 if (progressIndicator == 'diff') { | 186 if (progressIndicator == 'diff') { |
| 186 progressIndicator = 'compact'; | 187 progressIndicator = 'compact'; |
| 187 formatter = new ColorFormatter(); | 188 formatter = new ColorFormatter(); |
| 188 printFailures = false; | 189 printFailures = false; |
| 189 eventListener.add(new StatusFileUpdatePrinter()); | 190 eventListener.add(new StatusFileUpdatePrinter()); |
| 190 } | 191 } |
| 191 eventListener.add(new SummaryPrinter()); | 192 eventListener.add(new SummaryPrinter()); |
| 192 eventListener.add(new FlakyLogWriter()); | 193 eventListener.add(new FlakyLogWriter()); |
| 193 if (printFailures) { | 194 if (printFailures) { |
| 194 eventListener.add(new TestFailurePrinter(formatter)); | 195 // The buildbot has it's own failure summary since it needs to wrap it |
| 196 // into'@@@'-annotated sections. |
| 197 var printFaiureSummary = |
| 198 failureSummary && progressIndicator != 'buildbot'; |
| 199 eventListener.add(new TestFailurePrinter(printFaiureSummary, formatter)); |
| 195 } | 200 } |
| 196 eventListener.add(new ProgressIndicator.fromName(progressIndicator, | 201 eventListener.add(new ProgressIndicator.fromName(progressIndicator, |
| 197 startTime, | 202 startTime, |
| 198 formatter)); | 203 formatter)); |
| 199 if (printTiming) { | 204 if (printTiming) { |
| 200 eventListener.add(new TimingPrinter(startTime)); | 205 eventListener.add(new TimingPrinter(startTime)); |
| 201 } | 206 } |
| 202 eventListener.add(new SkippedCompilationsPrinter()); | 207 eventListener.add(new SkippedCompilationsPrinter()); |
| 203 eventListener.add(new LeftOverTempDirPrinter()); | 208 eventListener.add(new LeftOverTempDirPrinter()); |
| 204 } | 209 } |
| (...skipping 20 matching lines...) Expand all Loading... |
| 225 } | 230 } |
| 226 | 231 |
| 227 void main() { | 232 void main() { |
| 228 var optionsParser = new TestOptionsParser(); | 233 var optionsParser = new TestOptionsParser(); |
| 229 var configurations = optionsParser.parse(new Options().arguments); | 234 var configurations = optionsParser.parse(new Options().arguments); |
| 230 if (configurations != null || configurations.length > 0) { | 235 if (configurations != null || configurations.length > 0) { |
| 231 testConfigurations(configurations); | 236 testConfigurations(configurations); |
| 232 } | 237 } |
| 233 } | 238 } |
| 234 | 239 |
| OLD | NEW |