mirror of
https://github.com/flutter/flutter
synced 2024-09-12 21:01:59 +00:00
Update dev/bots/test.dart
(and friends) to provide --local-engine-host
. (#132354)
Partial work towards https://github.com/flutter/flutter/issues/132245. As far as I can tell, this just plumbs flags downwards and has no semantic changes.
This commit is contained in:
parent
5b0c7ea2c7
commit
491ba2307f
|
@ -213,7 +213,7 @@ String get shuffleSeed {
|
||||||
///
|
///
|
||||||
/// Examples:
|
/// Examples:
|
||||||
/// SHARD=tool_tests bin/cache/dart-sdk/bin/dart dev/bots/test.dart
|
/// SHARD=tool_tests bin/cache/dart-sdk/bin/dart dev/bots/test.dart
|
||||||
/// bin/cache/dart-sdk/bin/dart dev/bots/test.dart --local-engine=host_debug_unopt
|
/// bin/cache/dart-sdk/bin/dart dev/bots/test.dart --local-engine=host_debug_unopt --local-engine-host=host_debug_unopt
|
||||||
Future<void> main(List<String> args) async {
|
Future<void> main(List<String> args) async {
|
||||||
try {
|
try {
|
||||||
printProgress('STARTING ANALYSIS');
|
printProgress('STARTING ANALYSIS');
|
||||||
|
@ -221,6 +221,9 @@ Future<void> main(List<String> args) async {
|
||||||
if (arg.startsWith('--local-engine=')) {
|
if (arg.startsWith('--local-engine=')) {
|
||||||
localEngineEnv['FLUTTER_LOCAL_ENGINE'] = arg.substring('--local-engine='.length);
|
localEngineEnv['FLUTTER_LOCAL_ENGINE'] = arg.substring('--local-engine='.length);
|
||||||
flutterTestArgs.add(arg);
|
flutterTestArgs.add(arg);
|
||||||
|
} else if (arg.startsWith('--local-engine-host=')) {
|
||||||
|
localEngineEnv['FLUTTER_LOCAL_ENGINE_HOST'] = arg.substring('--local-engine-host='.length);
|
||||||
|
flutterTestArgs.add(arg);
|
||||||
} else if (arg.startsWith('--local-engine-src-path=')) {
|
} else if (arg.startsWith('--local-engine-src-path=')) {
|
||||||
localEngineEnv['FLUTTER_LOCAL_ENGINE_SRC_PATH'] = arg.substring('--local-engine-src-path='.length);
|
localEngineEnv['FLUTTER_LOCAL_ENGINE_SRC_PATH'] = arg.substring('--local-engine-src-path='.length);
|
||||||
flutterTestArgs.add(arg);
|
flutterTestArgs.add(arg);
|
||||||
|
|
|
@ -67,14 +67,16 @@ Please avoid setting any other timeouts.
|
||||||
#### Using local engine builds in integration tests
|
#### Using local engine builds in integration tests
|
||||||
|
|
||||||
The integration tests can be configured to use a specific local engine
|
The integration tests can be configured to use a specific local engine
|
||||||
variant by setting the `FLUTTER_LOCAL_ENGINE` environment variable to the
|
variant by setting the `FLUTTER_LOCAL_ENGINE` and `FLUTTER_LOCAL_ENGINE_HOST`
|
||||||
name of the local engine (e.g. "android_debug_unopt"). If the local engine build
|
environment svariable to the name of the local engines (e.g. `android_debug_unopt`
|
||||||
requires a source path, this can be provided by setting the `FLUTTER_LOCAL_ENGINE_SRC_PATH`
|
and `host_debug_unopt`). If the local engine build requires a source path, this
|
||||||
environment variable. This second variable is not necessary if the `flutter` and
|
can be provided by setting the `FLUTTER_LOCAL_ENGINE_SRC_PATH` environment
|
||||||
`engine` checkouts are in adjacent directories.
|
variable. This second variable is not necessary if the `flutter` and `engine`
|
||||||
|
checkouts are in adjacent directories.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
export FLUTTER_LOCAL_ENGINE=android_debug_unopt
|
export FLUTTER_LOCAL_ENGINE=android_debug_unopt
|
||||||
|
export FLUTTER_LOCAL_ENGINE_HOST=host_debug_unopt
|
||||||
flutter test test/integration.shard/some_test_case
|
flutter test test/integration.shard/some_test_case
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@ Future<void> getPackages(String folder) async {
|
||||||
}
|
}
|
||||||
|
|
||||||
const String kLocalEngineEnvironment = 'FLUTTER_LOCAL_ENGINE';
|
const String kLocalEngineEnvironment = 'FLUTTER_LOCAL_ENGINE';
|
||||||
|
const String kLocalEngineHostEnvironment = 'FLUTTER_LOCAL_ENGINE_HOST';
|
||||||
const String kLocalEngineLocation = 'FLUTTER_LOCAL_ENGINE_SRC_PATH';
|
const String kLocalEngineLocation = 'FLUTTER_LOCAL_ENGINE_SRC_PATH';
|
||||||
|
|
||||||
List<String> getLocalEngineArguments() {
|
List<String> getLocalEngineArguments() {
|
||||||
|
@ -75,6 +76,8 @@ List<String> getLocalEngineArguments() {
|
||||||
'--local-engine=${platform.environment[kLocalEngineEnvironment]}',
|
'--local-engine=${platform.environment[kLocalEngineEnvironment]}',
|
||||||
if (platform.environment.containsKey(kLocalEngineLocation))
|
if (platform.environment.containsKey(kLocalEngineLocation))
|
||||||
'--local-engine-src-path=${platform.environment[kLocalEngineLocation]}',
|
'--local-engine-src-path=${platform.environment[kLocalEngineLocation]}',
|
||||||
|
if (platform.environment.containsKey(kLocalEngineHostEnvironment))
|
||||||
|
'--local-engine-host=${platform.environment[kLocalEngineHostEnvironment]}',
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue