parent
6fb9a19182
commit
93eabf3558
@ -20,13 +20,7 @@ Future<void> _withApkInstall(
|
|||||||
final DeviceDiscovery devices = DeviceDiscovery();
|
final DeviceDiscovery devices = DeviceDiscovery();
|
||||||
final AndroidDevice device = await devices.workingDevice as AndroidDevice;
|
final AndroidDevice device = await devices.workingDevice as AndroidDevice;
|
||||||
await device.unlock();
|
await device.unlock();
|
||||||
try {
|
await device.adb(<String>['uninstall', bundleName], canFail: true);
|
||||||
// Force proper cleanup before trying to install app. If uninstall fails,
|
|
||||||
// we log exception and proceed with running the test.
|
|
||||||
await device.adb(<String>['uninstall', bundleName]);
|
|
||||||
} on Exception catch (error) {
|
|
||||||
print('adb uninstall failed with exception: $error. Will proceed with test run.');
|
|
||||||
}
|
|
||||||
await device.adb(<String>['install', '-r', apkPath]);
|
await device.adb(<String>['install', '-r', apkPath]);
|
||||||
try {
|
try {
|
||||||
await body(device);
|
await body(device);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user