Try to be more consistent about deleting test apps in devicelab logic. (#146856)

Fixes https://github.com/flutter/flutter/issues/137555.
This commit is contained in:
Ian Hickson
2024-04-17 10:18:26 -07:00
committed by GitHub
parent cf26b1150f
commit 0301c8dfa4
22 changed files with 66 additions and 22 deletions

View File

@@ -32,6 +32,7 @@ void main() {
'-d',
deviceId,
]);
await device.uninstallApp();
});
final String outputPath = Platform.environment['FLUTTER_TEST_OUTPUTS_DIR'] ?? p.join(complexLayoutPath, 'build');

View File

@@ -16,6 +16,7 @@ Future<String> _runWithMode(String mode, String deviceId) async {
'-d',
deviceId,
]);
await evalFlutter('install', options: <String>['--uninstall-only', '-d', deviceId]);
return stderr.toString();
}

View File

@@ -29,6 +29,7 @@ class HelloWorldMemoryTest extends MemoryTest {
await recordStart();
await Future<void>.delayed(const Duration(milliseconds: 3000));
await recordEnd();
await device!.uninstallApp();
}
}

View File

@@ -65,6 +65,7 @@ Future<TaskResult> run() async {
await Future<void>.delayed(const Duration(seconds: 30));
process.stdin.write('q');
await adb.cancel();
await device.uninstallApp();
});
if (!isUsingValidationLayers || impellerBackendCount != 1) {

View File

@@ -16,9 +16,9 @@ void main() {
final Device device = await devices.workingDevice;
await device.unlock();
final Directory appDir = dir(path.join(flutterDirectory.path, 'dev/integration_tests/ui'));
section('TEST WHETHER `flutter drive --route` WORKS on IOS');
section('TEST WHETHER `flutter drive --route` WORKS ON iOS');
await inDirectory(appDir, () async {
return flutter(
await flutter(
'drive',
options: <String>[
'--verbose',
@@ -29,6 +29,7 @@ void main() {
'lib/route.dart',
],
);
await device.uninstallApp();
});
return TaskResult.success(null);
});

View File

@@ -118,6 +118,7 @@ void main() {
if (result != 0) {
throw 'Received unexpected exit code $result from run process.';
}
await device.uninstallApp();
});
return TaskResult.success(null);
});