@@ -15,7 +15,7 @@ final String flutter = path.join(flutterRoot, 'bin', Platform.isWindows ? 'flutt
15
15
final String dart = path.join (flutterRoot, 'bin' , 'cache' , 'dart-sdk' , 'bin' , Platform .isWindows ? 'dart.exe' : 'dart' );
16
16
final String pub = path.join (flutterRoot, 'bin' , 'cache' , 'dart-sdk' , 'bin' , Platform .isWindows ? 'pub.bat' : 'pub' );
17
17
final String pubCache = path.join (flutterRoot, '.pub-cache' );
18
- final String flutterTestArgs = Platform .environment[ 'FLUTTER_TEST_ARGS' ];
18
+ final List < String > flutterTestArgs = < String > [ ];
19
19
final bool hasColor = stdout.supportsAnsiEscapes;
20
20
21
21
final String bold = hasColor ? '\x 1B[1m' : '' ;
@@ -32,17 +32,19 @@ const Map<String, ShardRunner> _kShards = const <String, ShardRunner>{
32
32
'coverage' : _runCoverage,
33
33
};
34
34
35
- /// When you call this, you can set FLUTTER_TEST_ARGS to pass custom
35
+ /// When you call this, you can pass additional arguments to pass custom
36
36
/// arguments to flutter test. For example, you might want to call this
37
- /// script using FLUTTER_TEST_ARGS= --local-engine=host_debug_unopt to
37
+ /// script with the parameter --local-engine=host_debug_unopt to
38
38
/// use your own build of the engine.
39
39
///
40
40
/// To run the analysis part, run it with SHARD=analyze
41
41
///
42
42
/// For example:
43
43
/// SHARD=analyze bin/cache/dart-sdk/bin/dart dev/bots/test.dart
44
- /// FLUTTER_TEST_ARGS=--local-engine=host_debug_unopt bin/cache/dart-sdk/bin/dart dev/bots/test.dart
45
- Future <Null > main () async {
44
+ /// bin/cache/dart-sdk/bin/dart dev/bots/test.dart --local-engine=host_debug_unopt
45
+ Future <Null > main (List <String > args) async {
46
+ flutterTestArgs.addAll (args);
47
+
46
48
final String shard = Platform .environment['SHARD' ] ?? 'tests' ;
47
49
if (! _kShards.containsKey (shard))
48
50
throw new ArgumentError ('Invalid shard: $shard ' );
@@ -317,7 +319,7 @@ Future<Null> _runFlutterTest(String workingDirectory, {
317
319
}) {
318
320
final List <String > args = < String > ['test' ]..addAll (options);
319
321
if (flutterTestArgs != null && flutterTestArgs.isNotEmpty)
320
- args.add (flutterTestArgs);
322
+ args.addAll (flutterTestArgs);
321
323
if (script != null )
322
324
args.add (script);
323
325
return _runCommand (flutter, args,
0 commit comments