Change few devicelab tests to support testing against local engine (#13268)
* Change some of the dev/devicelab tests to support testing against local engine. We can already configure flutter tools to use local engine by setting FLUTTER_ENGINE environment variable. However when this variable is set this also requires setting --local-engine to specify which flavor of engine to use. This change changes tests in dev/devicelab to pass a sensible default for --local-engine, e.g. when testing hot reload on Android we pass android_debug and when testing release AOT build for IOS we pass ios_release. * Fix analysis issues * Update utils.dart
This commit is contained in:
@@ -26,6 +26,7 @@ TaskFunction createHotModeTest({ bool isPreviewDart2: false }) {
|
||||
];
|
||||
if (isPreviewDart2)
|
||||
options.add('--preview-dart-2');
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
int hotReloadCount = 0;
|
||||
await inDirectory(flutterDirectory, () async {
|
||||
rmTree(_editedFlutterGalleryDir);
|
||||
|
||||
@@ -40,6 +40,7 @@ TaskFunction createMicrobenchmarkTask() {
|
||||
];
|
||||
if (previewDart2)
|
||||
options.add('--preview-dart-2');
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
options.add(benchmarkPath);
|
||||
return await _startFlutter(
|
||||
options: options,
|
||||
|
||||
@@ -235,6 +235,7 @@ class CompileTest {
|
||||
}
|
||||
if (previewDart2)
|
||||
options.add('--preview-dart-2');
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
final String compileLog = await evalFlutter('build', options: options);
|
||||
watch.stop();
|
||||
|
||||
@@ -256,6 +257,7 @@ class CompileTest {
|
||||
final List<String> options = <String>['--release'];
|
||||
if (previewDart2)
|
||||
options.add('--preview-dart-2');
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
switch (deviceOperatingSystem) {
|
||||
case DeviceOperatingSystem.ios:
|
||||
options.insert(0, 'ios');
|
||||
@@ -288,6 +290,7 @@ class CompileTest {
|
||||
final List<String> options = <String>['--debug'];
|
||||
if (previewDart2)
|
||||
options.add('--preview-dart-2');
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
switch (deviceOperatingSystem) {
|
||||
case DeviceOperatingSystem.ios:
|
||||
options.insert(0, 'ios');
|
||||
|
||||
Reference in New Issue
Block a user