Unverified Commit 4a3e2a1a authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Revert "[devicelab] reduce iterations, uninstall at end, and use ...

Revert "[devicelab] reduce iterations, uninstall at end, and use  --application-binary in all startup tests (#68516)" (#68531)

This reverts commit a4c2075a.
parent 8262f808
......@@ -454,56 +454,24 @@ class StartupTest {
Future<TaskResult> run() async {
return await inDirectory<TaskResult>(testDirectory, () async {
final Device device = await devices.workingDevice;
const int iterations = 5;
final List<Map<String, dynamic>> results = <Map<String, dynamic>>[];
section('Building application');
String applicationBinaryPath;
switch (deviceOperatingSystem) {
case DeviceOperatingSystem.android:
await flutter('build', options: <String>[
'apk',
'-v',
'--profile',
'--target-platform=android-arm,android-arm64',
]);
applicationBinaryPath = '$testDirectory/build/app/outputs/flutter-apk/app-profile.apk';
break;
case DeviceOperatingSystem.ios:
await flutter('build', options: <String>[
'ios',
'-v',
'--profile',
]);
applicationBinaryPath = '$testDirectory/build/ios/iphoneos/Runner.app';
break;
case DeviceOperatingSystem.fuchsia:
case DeviceOperatingSystem.fake:
break;
}
final String deviceId = (await devices.workingDevice).deviceId;
await flutter('packages', options: <String>['get']);
for (int i = 0; i < iterations; i += 1) {
const int iterations = 15;
final List<Map<String, dynamic>> results = <Map<String, dynamic>>[];
for (int i = 0; i < iterations; ++i) {
await flutter('run', options: <String>[
'--no-android-gradle-daemon',
'--verbose',
'--profile',
'--trace-startup',
'-d',
device.deviceId,
if (applicationBinaryPath != null)
'--use-application-binary=$applicationBinaryPath',
deviceId,
]);
final Map<String, dynamic> data = json.decode(
file('$testDirectory/build/start_up_info.json').readAsStringSync(),
) as Map<String, dynamic>;
results.add(data);
await flutter('install', options: <String>[
'--uninstall-only',
'-d',
device.deviceId,
]);
}
final Map<String, dynamic> averageResults = _average(results, iterations);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment