[devicelab] allow the devicelab to take a screenshot if the iOS connection fails with FLUTTER_IOS_SCREENSHOT_ON_CONNECTION_FAILURE (#68156)

More attempts to remote diagnose the issues in the iOS devicelab
This commit is contained in:
Jonah Williams
2020-10-15 13:13:28 -07:00
committed by GitHub
parent 25857ce513
commit 0f88644883
3 changed files with 45 additions and 2 deletions

View File

@@ -443,11 +443,11 @@ List<String> flutterCommandArgs(String command, List<String> options) {
Future<int> flutter(String command, {
List<String> options = const <String>[],
bool canFail = false, // as in, whether failures are ok. False means that they are fatal.
Map<String, String> environment,
Map<String, String> environment = const <String, String>{},
}) {
final List<String> args = flutterCommandArgs(command, options);
return exec(path.join(flutterDirectory.path, 'bin', 'flutter'), args,
canFail: canFail, environment: environment);
canFail: canFail, environment: <String, String>{...?environment, 'FLUTTER_IOS_SCREENSHOT_ON_CONNECTION_FAILURE': 'true'});
}
/// Runs a `flutter` command and returns the standard output as a string.