Add device ready check (#135526)

*Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. You must list at least one issue.*
Fixes https://github.com/flutter/flutter/issues/121420

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
This commit is contained in:
Ricardo Amador
2023-09-29 18:58:52 -07:00
committed by GitHub
parent d7739dff68
commit 4e5e47e76a
2 changed files with 54 additions and 13 deletions

View File

@@ -958,11 +958,7 @@ class StartupTest {
}
}
await flutter('install', options: <String>[
'--uninstall-only',
'-d',
device.deviceId,
]);
await device.uninstallApp();
}
final Map<String, dynamic> averageResults = _average(results, iterations);
@@ -1084,11 +1080,7 @@ class DevtoolsStartupTest {
await process.exitCode;
}
await flutter('install', options: <String>[
'--uninstall-only',
'-d',
device.deviceId,
]);
await device.uninstallApp();
if (sawLine) {
return TaskResult.success(null, benchmarkScoreKeys: <String>[]);
@@ -1850,7 +1842,7 @@ class MemoryTest {
}
await adb.cancel();
await flutter('install', options: <String>['--uninstall-only', '-d', device!.deviceId]);
await device!.uninstallApp();
final ListStatistics startMemoryStatistics = ListStatistics(_startMemory);
final ListStatistics endMemoryStatistics = ListStatistics(_endMemory);