Skip to content

Commit 12d610e

Browse files
munificentcommit-bot@chromium.org
authored andcommitted
Clean up the test runner help a little.
- Move sanitizer down since it's less relevant than compiler, etc. - Update the compiler docs to match the current set of compilers. Change-Id: I2f44eaad0f38186c942c74d1bfdc13caf20708c6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137324 Auto-Submit: Bob Nystrom <[email protected]> Commit-Queue: Alexander Thomas <[email protected]> Reviewed-by: Alexander Thomas <[email protected]>
1 parent 7eaafa0 commit 12d610e

File tree

1 file changed

+27
-26
lines changed

1 file changed

+27
-26
lines changed

pkg/test_runner/lib/src/options.dart

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -93,26 +93,27 @@ enum _OptionValueType { bool, int, string }
9393
class OptionsParser {
9494
static final List<_Option> _options = [
9595
_Option('mode', 'Mode in which to run the tests.',
96-
abbr: 'm', values: ['all']..addAll(Mode.names)),
97-
_Option('sanitizer', 'Sanitizer in which to run the tests.',
98-
defaultsTo: Sanitizer.none.name,
99-
values: ['all']..addAll(Sanitizer.names)),
96+
abbr: 'm', values: ['all', ...Mode.names]),
10097
_Option(
10198
'compiler',
10299
'''How the Dart code should be compiled or statically processed.
103-
104-
none: Do not compile the Dart code.
105-
precompiler: Compile into AOT snapshot before running the test.
106-
dart2js: Compile to JavaScript using dart2js.
107-
dart2analyzer: Perform static analysis on Dart code using the analyzer.
108-
compareAnalyzerCfe: Compare analyzer and common front end representations.
109-
app_jit: Compile the Dart code into an app snapshot.
110-
app_jitk: Compile the Dart code into Kernel and then into an app snapshot.
111-
dartk: Compile the Dart code into Kernel before running test.
112-
dartkb: Compile the Dart code into Kernel with bytecode before running test.
113-
dartkp: Compile the Dart code into Kernel and then Kernel into AOT
114-
snapshot before running the test.
115-
spec_parser: Parse Dart code using the specification parser.''',
100+
none: Do not compile the Dart code.
101+
dart2js: Compile to JavaScript using dart2js.
102+
dart2analyzer: Perform static analysis on Dart code using the analyzer.
103+
compare_analyzer_cfe: Compare analyzer and common front end representations.
104+
dartdevc: Compile to JavaScript using dart2js.
105+
dartdevk: Compile to JavaScript using dartdevk.
106+
app_jitk: Compile the Dart code into Kernel and then into an app
107+
snapshot.
108+
dartk: Compile the Dart code into Kernel before running test.
109+
dartkb: Compile the Dart code into Kernel with bytecode before
110+
running test.
111+
dartkp: Compile the Dart code into Kernel and then Kernel into
112+
AOT snapshot before running the test.
113+
spec_parser: Parse Dart code using the specification parser.
114+
115+
fasta: Compile using CFE for errors, but do not run.
116+
''',
116117
abbr: 'c',
117118
values: Compiler.names),
118119
_Option(
@@ -149,14 +150,16 @@ ia32, x64
149150
arm, armv6, arm64,
150151
simarm, simarmv6, simarm64, arm_x64''',
151152
abbr: 'a',
152-
values: ['all']..addAll(Architecture.names),
153+
values: ['all', ...Architecture.names],
153154
defaultsTo: Architecture.x64.name,
154155
hide: true),
155156
_Option('system', 'The operating system to run tests on.',
156157
abbr: 's',
157158
values: System.names,
158159
defaultsTo: Platform.operatingSystem,
159160
hide: true),
161+
_Option('sanitizer', 'Sanitizer in which to run the tests.',
162+
defaultsTo: Sanitizer.none.name, values: ['all', ...Sanitizer.names]),
160163
_Option(
161164
'named_configuration',
162165
'''The named test configuration that supplies the values for all
@@ -675,16 +678,14 @@ compiler.''',
675678
}
676679

677680
var runtimeNames = data["runtime"] as String;
678-
var runtimes = <Runtime>[];
679-
if (runtimeNames != null) {
680-
runtimes.addAll(runtimeNames.split(",").map(Runtime.find));
681-
}
681+
var runtimes = [
682+
if (runtimeNames != null) ...runtimeNames.split(",").map(Runtime.find)
683+
];
682684

683685
var compilerNames = data["compiler"] as String;
684-
var compilers = <Compiler>[];
685-
if (compilerNames != null) {
686-
compilers.addAll(compilerNames.split(",").map(Compiler.find));
687-
}
686+
var compilers = [
687+
if (compilerNames != null) ...compilerNames.split(",").map(Compiler.find)
688+
];
688689

689690
// Pick default compilers or runtimes if only one or the other is provided.
690691
if (runtimes.isEmpty) {

0 commit comments

Comments
 (0)