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 { ...@@ -454,56 +454,24 @@ class StartupTest {
Future<TaskResult> run() async { Future<TaskResult> run() async {
return await inDirectory<TaskResult>(testDirectory, () async { return await inDirectory<TaskResult>(testDirectory, () async {
final Device device = await devices.workingDevice; final String deviceId = (await devices.workingDevice).deviceId;
const int iterations = 5; await flutter('packages', options: <String>['get']);
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;
}
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>[ await flutter('run', options: <String>[
'--no-android-gradle-daemon', '--no-android-gradle-daemon',
'--verbose', '--verbose',
'--profile', '--profile',
'--trace-startup', '--trace-startup',
'-d', '-d',
device.deviceId, deviceId,
if (applicationBinaryPath != null)
'--use-application-binary=$applicationBinaryPath',
]); ]);
final Map<String, dynamic> data = json.decode( final Map<String, dynamic> data = json.decode(
file('$testDirectory/build/start_up_info.json').readAsStringSync(), file('$testDirectory/build/start_up_info.json').readAsStringSync(),
) as Map<String, dynamic>; ) as Map<String, dynamic>;
results.add(data); results.add(data);
await flutter('install', options: <String>[
'--uninstall-only',
'-d',
device.deviceId,
]);
} }
final Map<String, dynamic> averageResults = _average(results, iterations); 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