Unverified Commit e8bd5a32 authored by Victoria Ashworth's avatar Victoria Ashworth Committed by GitHub

Delete simulator after plugin_test_ios (#136265)

Remove simulator once it's no longer needed for test `plugin_test_ios` .

Fixes https://github.com/flutter/flutter/issues/136224
parent 5064f782
......@@ -263,17 +263,23 @@ public class $pluginClass: NSObject, FlutterPlugin {
throw TaskResult.failure('Platform unit tests failed');
}
case 'ios':
await testWithNewIOSSimulator('TestNativeUnitTests', (String deviceId) async {
if (!await runXcodeTests(
platformDirectory: path.join(rootPath, 'ios'),
destination: 'id=$deviceId',
configuration: 'Debug',
testName: 'native_plugin_unit_tests_ios',
skipCodesign: true,
)) {
throw TaskResult.failure('Platform unit tests failed');
}
});
String? simulatorDeviceId;
try {
await testWithNewIOSSimulator('TestNativeUnitTests', (String deviceId) async {
simulatorDeviceId = deviceId;
if (!await runXcodeTests(
platformDirectory: path.join(rootPath, 'ios'),
destination: 'id=$deviceId',
configuration: 'Debug',
testName: 'native_plugin_unit_tests_ios',
skipCodesign: true,
)) {
throw TaskResult.failure('Platform unit tests failed');
}
});
} finally {
await removeIOSimulator(simulatorDeviceId);
}
case 'linux':
if (await exec(
path.join(rootPath, 'build', 'linux', 'x64', 'release', 'plugins', 'plugintest', 'plugintest_test'),
......
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