| 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 /** | 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 10 matching lines...) Expand all Loading... |
| 21 * "tools/testing/test_options.dart". | 21 * "tools/testing/test_options.dart". |
| 22 * | 22 * |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #library("test"); | 25 #library("test"); |
| 26 | 26 |
| 27 #import("dart:io"); | 27 #import("dart:io"); |
| 28 #import("testing/dart/test_runner.dart"); | 28 #import("testing/dart/test_runner.dart"); |
| 29 #import("testing/dart/test_options.dart"); | 29 #import("testing/dart/test_options.dart"); |
| 30 #import("testing/dart/test_suite.dart"); | 30 #import("testing/dart/test_suite.dart"); |
| 31 #import("testing/dart/test_progress.dart"); |
| 31 | 32 |
| 32 #import("../compiler/tests/dartc/test_config.dart"); | 33 #import("../compiler/tests/dartc/test_config.dart"); |
| 33 #import("../runtime/tests/vm/test_config.dart"); | 34 #import("../runtime/tests/vm/test_config.dart"); |
| 34 #import("../samples/tests/dartc/test_config.dart"); | 35 #import("../samples/tests/dartc/test_config.dart"); |
| 35 #import("../tests/co19/test_config.dart"); | 36 #import("../tests/co19/test_config.dart"); |
| 36 | 37 |
| 37 /** | 38 /** |
| 38 * The directories that contain test suites which follow the conventions | 39 * The directories that contain test suites which follow the conventions |
| 39 * required by [StandardTestSuite]'s forDirectory constructor. | 40 * required by [StandardTestSuite]'s forDirectory constructor. |
| 40 * New test suites should follow this convention because it makes it much | 41 * New test suites should follow this convention because it makes it much |
| (...skipping 27 matching lines...) Expand all Loading... |
| 68 var startTime = new Date.now(); | 69 var startTime = new Date.now(); |
| 69 var optionsParser = new TestOptionsParser(); | 70 var optionsParser = new TestOptionsParser(); |
| 70 List<Map> configurations = optionsParser.parse(new Options().arguments); | 71 List<Map> configurations = optionsParser.parse(new Options().arguments); |
| 71 if (configurations == null || configurations.length == 0) return; | 72 if (configurations == null || configurations.length == 0) return; |
| 72 | 73 |
| 73 // Extract global options from first configuration. | 74 // Extract global options from first configuration. |
| 74 var firstConf = configurations[0]; | 75 var firstConf = configurations[0]; |
| 75 Map<String, RegExp> selectors = firstConf['selectors']; | 76 Map<String, RegExp> selectors = firstConf['selectors']; |
| 76 var maxProcesses = firstConf['tasks']; | 77 var maxProcesses = firstConf['tasks']; |
| 77 var progressIndicator = firstConf['progress']; | 78 var progressIndicator = firstConf['progress']; |
| 79 BuildbotProgressIndicator.stepName = firstConf['step_name']; |
| 78 var verbose = firstConf['verbose']; | 80 var verbose = firstConf['verbose']; |
| 79 var printTiming = firstConf['time']; | 81 var printTiming = firstConf['time']; |
| 80 var listTests = firstConf['list']; | 82 var listTests = firstConf['list']; |
| 81 | 83 |
| 82 // Print the configurations being run by this execution of | 84 // Print the configurations being run by this execution of |
| 83 // test.dart. However, don't do it if the silent progress indicator | 85 // test.dart. However, don't do it if the silent progress indicator |
| 84 // is used. This is only needed because of the junit tests. | 86 // is used. This is only needed because of the junit tests. |
| 85 if (progressIndicator != 'silent') { | 87 if (progressIndicator != 'silent') { |
| 86 List output_words = configurations.length > 1 ? | 88 List output_words = configurations.length > 1 ? |
| 87 ['Test configurations:'] : ['Test configuration:']; | 89 ['Test configurations:'] : ['Test configuration:']; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 129 |
| 128 // Start process queue. | 130 // Start process queue. |
| 129 var queue = new ProcessQueue(maxProcesses, | 131 var queue = new ProcessQueue(maxProcesses, |
| 130 progressIndicator, | 132 progressIndicator, |
| 131 startTime, | 133 startTime, |
| 132 printTiming, | 134 printTiming, |
| 133 enqueueConfiguration, | 135 enqueueConfiguration, |
| 134 verbose, | 136 verbose, |
| 135 listTests); | 137 listTests); |
| 136 } | 138 } |
| OLD | NEW |