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