Add cold boot option to emulator launch command (#82647)
This commit is contained in:
@@ -144,6 +144,22 @@ void main() {
|
||||
await emulator.launch(startupDuration: Duration.zero);
|
||||
});
|
||||
|
||||
testWithoutContext('succeeds with coldboot launch', () async {
|
||||
final List<String> kEmulatorLauchColdBootCommand = <String>[
|
||||
...kEmulatorLaunchCommand,
|
||||
'-no-snapshot-load'
|
||||
];
|
||||
final AndroidEmulator emulator = AndroidEmulator(emulatorID,
|
||||
processManager: FakeProcessManager.list(<FakeCommand>[
|
||||
FakeCommand(command: kEmulatorLauchColdBootCommand),
|
||||
]),
|
||||
androidSdk: mockSdk,
|
||||
logger: BufferLogger.test(),
|
||||
);
|
||||
|
||||
await emulator.launch(startupDuration: Duration.zero, coldBoot: true);
|
||||
});
|
||||
|
||||
testWithoutContext('prints error on failure', () async {
|
||||
final BufferLogger logger = BufferLogger.test();
|
||||
final AndroidEmulator emulator = AndroidEmulator(emulatorID,
|
||||
|
||||
@@ -367,7 +367,7 @@ class FakeEmulator extends Emulator {
|
||||
PlatformType get platformType => PlatformType.android;
|
||||
|
||||
@override
|
||||
Future<void> launch() {
|
||||
Future<void> launch({bool coldBoot = false}) {
|
||||
throw UnimplementedError('Not implemented in Mock');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user