OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 | |
5 /// This file is the entrypoint of the Dart repository's custom test system. | |
6 /// It is used to test: | |
7 /// | |
8 /// 1. The Dart VM | |
9 /// 2. The dart2js compiler | |
10 /// 3. The static analyzer | |
11 /// 4. The Dart core library | |
12 /// 5. Other standard dart libraries (DOM bindings, UI libraries, | |
13 /// IO libraries etc.) | |
14 /// | |
15 /// This script is normally invoked by test.py. (test.py finds the Dart VM and | |
16 /// passes along all command line arguments to this script.) | |
17 /// | |
18 /// The command line args of this script are documented in "test_options.dart". | |
19 /// They are printed when this script is run with "--help". | |
20 /// | |
21 /// The default test directory layout is documented in "test_suite.dart", above | |
22 /// `factory StandardTestSuite.forDirectory`. | |
23 import "dart:io"; | |
24 | |
25 import "test_configurations.dart"; | |
26 import "test_options.dart"; | |
27 import "test_progress.dart"; | |
28 import "test_suite.dart"; | |
29 | |
30 /// Runs all of the tests specified by the given command line [arguments]. | |
31 void main(List<String> arguments) { | |
32 // This script is in "<repo>/tools/testing/dart". | |
33 TestUtils.setDartDirUri(Platform.script.resolve('../../..')); | |
34 | |
35 // Clean up any stale temp directories from previous runs. | |
36 if (Platform.environment['DART_TESTING_DELETE_TEMPORARY_DIRECTORIES'] == | |
37 '1') { | |
38 LeftOverTempDirPrinter.deleteAll(); | |
Bill Hesse
2017/05/02 14:33:08
I see that this has become a sync call, so OK.
Bob Nystrom
2017/05/02 23:48:15
Yup. I didn't see much benefit to making it async.
| |
39 } | |
40 | |
41 // Parse the command line arguments to a configuration. | |
42 var optionsParser = new TestOptionsParser(); | |
43 var configurations = optionsParser.parse(arguments); | |
44 if (configurations == null || configurations.isEmpty) return; | |
45 | |
46 // Run all of the configured tests. | |
47 // TODO(26372): Ensure that all tasks complete and return a future from this | |
48 // function. | |
49 testConfigurations(configurations); | |
50 } | |
OLD | NEW |