Update dev/devicelab/** to provide --local-engine-host. (#132342)
Partial work towards https://github.com/flutter/flutter/issues/132245. I have to admit I don't totally understand what I've updated, or whether there are more integration points needed.
This commit is contained in:
@@ -26,6 +26,14 @@ String? get localEngineFromEnv {
|
||||
return isDefined ? const String.fromEnvironment('localEngine') : null;
|
||||
}
|
||||
|
||||
/// The local engine host to use for [flutter] and [evalFlutter], if any.
|
||||
///
|
||||
/// This is set as an environment variable when running the task, see runTask in runner.dart.
|
||||
String? get localEngineHostFromEnv {
|
||||
const bool isDefined = bool.hasEnvironment('localEngineHost');
|
||||
return isDefined ? const String.fromEnvironment('localEngineHost') : null;
|
||||
}
|
||||
|
||||
/// The local engine source path to use if a local engine is used for [flutter]
|
||||
/// and [evalFlutter].
|
||||
///
|
||||
@@ -453,6 +461,7 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
|
||||
'screenshot',
|
||||
};
|
||||
final String? localEngine = localEngineFromEnv;
|
||||
final String? localEngineHost = localEngineHostFromEnv;
|
||||
final String? localEngineSrcPath = localEngineSrcPathFromEnv;
|
||||
final String? localWebSdk = localWebSdkFromEnv;
|
||||
return <String>[
|
||||
@@ -468,6 +477,7 @@ List<String> _flutterCommandArgs(String command, List<String> options) {
|
||||
hostAgent.dumpDirectory!.path,
|
||||
],
|
||||
if (localEngine != null) ...<String>['--local-engine', localEngine],
|
||||
if (localEngineHost != null) ...<String>['--local-engine-host', localEngineHost],
|
||||
if (localEngineSrcPath != null) ...<String>['--local-engine-src-path', localEngineSrcPath],
|
||||
if (localWebSdk != null) ...<String>['--local-web-sdk', localWebSdk],
|
||||
...options,
|
||||
|
||||
Reference in New Issue
Block a user