forked from firka/flutter
Try to be more consistent about deleting test apps in devicelab logic (#146931)
Fixes #137555. This is an updated version of https://github.com/flutter/flutter/pull/146856, which was reverted in https://github.com/flutter/flutter/pull/146927. The first commit is identical to the original PR, and subsequent commits are the fixes to address failures detected in devicelab post-commit.
This commit is contained in:
@@ -32,6 +32,7 @@ void main() {
|
||||
'-d',
|
||||
deviceId,
|
||||
]);
|
||||
await device.uninstallApp();
|
||||
});
|
||||
|
||||
final String outputPath = Platform.environment['FLUTTER_TEST_OUTPUTS_DIR'] ?? p.join(complexLayoutPath, 'build');
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ class HelloWorldMemoryTest extends MemoryTest {
|
||||
await recordStart();
|
||||
await Future<void>.delayed(const Duration(milliseconds: 3000));
|
||||
await recordEnd();
|
||||
await device!.uninstallApp();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -7,6 +7,5 @@ import 'package:flutter_devicelab/framework/framework.dart' show task;
|
||||
import 'package:flutter_devicelab/tasks/platform_channels_benchmarks.dart' as platform_channels_benchmarks;
|
||||
|
||||
Future<void> main() async {
|
||||
await task(
|
||||
platform_channels_benchmarks.runTask(DeviceOperatingSystem.android));
|
||||
await task(platform_channels_benchmarks.runTask(DeviceOperatingSystem.android));
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user