Take screenshot on devicelab failure (#122249)

Take screenshot on devicelab failure
This commit is contained in:
Jenn Magder
2023-03-14 19:13:21 -07:00
committed by GitHub
parent a599c08c32
commit e2e313ecf6
2 changed files with 81 additions and 16 deletions

View File

@@ -252,10 +252,14 @@ Future<void> main() async {
section('gradlew on build script with error');
await project.introduceError();
ProcessResult result = await inDirectory(project.rootPath, () {
return executeFlutter('build', options: <String>[
'apk',
'--release',
]);
return executeFlutter(
'build',
options: <String>[
'apk',
'--release',
],
canFail: true,
);
});
if (result.exitCode == 0) {
@@ -278,10 +282,14 @@ Future<void> main() async {
section('flutter build apk on build script with error');
await project.introduceError();
result = await inDirectory(project.rootPath, () {
return executeFlutter('build', options: <String>[
'apk',
'--release',
]);
return executeFlutter(
'build',
options: <String>[
'apk',
'--release',
],
canFail: true,
);
});
if (result.exitCode == 0) {
throw failure(
@@ -304,10 +312,14 @@ Future<void> main() async {
section('gradlew assembleDebug forwards stderr');
await project.introducePubspecError();
final ProcessResult result = await inDirectory(project.rootPath, () {
return executeFlutter('build', options: <String>[
'apk',
'--release',
]);
return executeFlutter(
'build',
options: <String>[
'apk',
'--release',
],
canFail: true,
);
});
if (result.exitCode == 0) {
throw failure(