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 12 matching lines...) Expand all Loading... | |
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 import "testing/dart/test_progress.dart"; |
32 import "testing/dart/http_server.dart"; | 32 import "testing/dart/http_server.dart"; |
33 import "testing/dart/utils.dart"; | |
33 | 34 |
34 import "../compiler/tests/dartc/test_config.dart"; | 35 import "../compiler/tests/dartc/test_config.dart"; |
35 import "../runtime/tests/vm/test_config.dart"; | 36 import "../runtime/tests/vm/test_config.dart"; |
36 import "../samples/tests/dartc/test_config.dart"; | 37 import "../samples/tests/dartc/test_config.dart"; |
37 import "../tests/co19/test_config.dart"; | 38 import "../tests/co19/test_config.dart"; |
38 | 39 |
39 /** | 40 /** |
40 * The directories that contain test suites which follow the conventions | 41 * The directories that contain test suites which follow the conventions |
41 * required by [StandardTestSuite]'s forDirectory constructor. | 42 * required by [StandardTestSuite]'s forDirectory constructor. |
42 * New test suites should follow this convention because it makes it much | 43 * New test suites should follow this convention because it makes it much |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
82 var printTiming = firstConf['time']; | 83 var printTiming = firstConf['time']; |
83 var listTests = firstConf['list']; | 84 var listTests = firstConf['list']; |
84 | 85 |
85 if (!firstConf['append_flaky_log']) { | 86 if (!firstConf['append_flaky_log']) { |
86 var file = new File(TestUtils.flakyFileName()); | 87 var file = new File(TestUtils.flakyFileName()); |
87 if (file.existsSync()) { | 88 if (file.existsSync()) { |
88 file.deleteSync(); | 89 file.deleteSync(); |
89 } | 90 } |
90 } | 91 } |
91 | 92 |
93 DebugLogger.init(firstConf['write_debug_log'] ? | |
ricow1
2013/01/17 17:07:38
write_debug_log -> write_debug_log_to_file ?
kustermann
2013/01/18 09:03:25
This way the name is the same as the command line
| |
94 TestUtils.debugLogfile() : null); | |
95 | |
92 // Print the configurations being run by this execution of | 96 // Print the configurations being run by this execution of |
93 // test.dart. However, don't do it if the silent progress indicator | 97 // test.dart. However, don't do it if the silent progress indicator |
94 // is used. This is only needed because of the junit tests. | 98 // is used. This is only needed because of the junit tests. |
95 if (progressIndicator != 'silent') { | 99 if (progressIndicator != 'silent') { |
96 List output_words = configurations.length > 1 ? | 100 List output_words = configurations.length > 1 ? |
97 ['Test configurations:'] : ['Test configuration:']; | 101 ['Test configurations:'] : ['Test configuration:']; |
98 for (Map conf in configurations) { | 102 for (Map conf in configurations) { |
99 List settings = ['compiler', 'runtime', 'mode', 'arch'] | 103 List settings = ['compiler', 'runtime', 'mode', 'arch'] |
100 .mappedBy((name) => conf[name]).toList(); | 104 .mappedBy((name) => conf[name]).toList(); |
101 if (conf['checked']) settings.add('checked'); | 105 if (conf['checked']) settings.add('checked'); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
153 // Start process queue. | 157 // Start process queue. |
154 new ProcessQueue(maxProcesses, | 158 new ProcessQueue(maxProcesses, |
155 progressIndicator, | 159 progressIndicator, |
156 startTime, | 160 startTime, |
157 printTiming, | 161 printTiming, |
158 enqueueConfiguration, | 162 enqueueConfiguration, |
159 () => TestingServerRunner.terminateHttpServers(), | 163 () => TestingServerRunner.terminateHttpServers(), |
160 verbose, | 164 verbose, |
161 listTests); | 165 listTests); |
162 } | 166 } |
OLD | NEW |