@@ -9,14 +9,13 @@ import 'configuration.dart';
9
9
///
10
10
/// Each step on a builder runs a script the with provided arguments. If the
11
11
/// script is 'tools/test.py' (which is the default if no script is given in
12
- /// the test matrix), the step is called a 'test step'. Test steps must include
13
- /// the '--named_configuration' (for short '-n') option to select the named
14
- /// [Configuration] to test.
12
+ /// the test matrix), or `testRunner == true` , the step is called a 'test
13
+ /// step'. Test steps must include the '--named_configuration' (for short
14
+ /// '-n') option to select the named [Configuration] to test.
15
15
///
16
- /// Test steps and steps with `isTestRunner == true` are expected to produce
17
- /// test results that are collected during the run of the builder and checked
18
- /// against the expected results to determine the success or failure of the
19
- /// build.
16
+ /// Test steps are expected to produce test results that are collected during
17
+ /// the run of the builder and checked against the expected results to determine
18
+ /// the success or failure of the build.
20
19
class Step {
21
20
final String name;
22
21
final String script;
@@ -33,7 +32,7 @@ class Step {
33
32
34
33
static const testScriptName = "tools/test.py" ;
35
34
36
- bool get isTestStep => script == testScriptName;
35
+ bool get isTestStep => script == testScriptName || isTestRunner ;
37
36
38
37
/// Create a [Step] from the 'step template' [map] , values for supported
39
38
/// variables [configuration] , and the list of supported named configurations.
@@ -44,7 +43,8 @@ class Step {
44
43
.toList ();
45
44
var testedConfigurations = < Configuration > [];
46
45
var script = map["script" ] as String ?? testScriptName;
47
- if (script == testScriptName) {
46
+ var isTestRunner = map["testRunner" ] as bool ?? false ;
47
+ if (script == testScriptName || isTestRunner) {
48
48
// TODO(karlklose): replace with argument parser that can handle all
49
49
// arguments to test.py.
50
50
for (var argument in arguments) {
@@ -80,7 +80,7 @@ class Step {
80
80
< String , String > {...? map["environment" ]},
81
81
map["fileset" ] as String ,
82
82
map["shards" ] as int ,
83
- map[ "testRunner" ] as bool ?? false ,
83
+ isTestRunner ,
84
84
testedConfigurations.isEmpty ? null : testedConfigurations.single);
85
85
}
86
86
}
0 commit comments