From 236a114ddb1eb0297bde1360837594d50f236ffe Mon Sep 17 00:00:00 2001 From: Jenn Magder Date: Wed, 23 Jun 2021 12:11:03 -0700 Subject: [PATCH] Remove tests checking Xcode 11 naming conventions (#85094) --- .../build_ios_framework_module_test.dart | 77 ++++--------------- 1 file changed, 14 insertions(+), 63 deletions(-) diff --git a/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart b/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart index b5e63df483..e73496c739 100644 --- a/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart +++ b/dev/devicelab/bin/tasks/build_ios_framework_module_test.dart @@ -113,69 +113,20 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals final String outputPath = path.join(projectDir.path, outputDirectoryName); - // Xcode changed the name of this generated directory in Xcode 12. - const String xcode11ArmDirectoryName = 'ios-armv7_arm64'; - const String xcode12ArmDirectoryName = 'ios-arm64_armv7'; - - final String xcode11AppFrameworkDirectory = path.join( - outputPath, - 'Debug', - 'App.xcframework', - xcode11ArmDirectoryName, - 'App.framework', - 'App', - ); - final String xcode12AppFrameworkDirectory = path.join( - outputPath, - 'Debug', - 'App.xcframework', - xcode12ArmDirectoryName, - 'App.framework', - 'App', - ); - - // Based on the locally installed version of Xcode. - String localXcodeArmDirectoryName; - if (exists(File(xcode11AppFrameworkDirectory))) { - localXcodeArmDirectoryName = xcode11ArmDirectoryName; - } else if (exists(File(xcode12AppFrameworkDirectory))) { - localXcodeArmDirectoryName = xcode12ArmDirectoryName; - } else { - throw const FileSystemException('Expected App.framework binary to exist.'); - } - - final String xcode11FlutterFrameworkDirectory = path.join( + checkFileExists(path.join( outputPath, 'Debug', 'Flutter.xcframework', - xcode11ArmDirectoryName, + 'ios-arm64_armv7', 'Flutter.framework', 'Flutter', - ); - final String xcode12FlutterFrameworkDirectory = path.join( - outputPath, - 'Debug', - 'Flutter.xcframework', - xcode12ArmDirectoryName, - 'Flutter.framework', - 'Flutter', - ); - - // Based on the version of Xcode installed on the engine builder. - String builderXcodeArmDirectoryName; - if (exists(File(xcode11FlutterFrameworkDirectory))) { - builderXcodeArmDirectoryName = xcode11ArmDirectoryName; - } else if (exists(File(xcode12FlutterFrameworkDirectory))) { - builderXcodeArmDirectoryName = xcode12ArmDirectoryName; - } else { - throw const FileSystemException('Expected Flutter.framework binary to exist.'); - } + )); final String debugAppFrameworkPath = path.join( outputPath, 'Debug', 'App.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'App.framework', 'App', ); @@ -223,7 +174,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, mode, 'App.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'App.framework', 'App', ); @@ -240,7 +191,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, mode, 'App.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'App.framework', 'flutter_assets', 'vm_snapshot_data', @@ -263,7 +214,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, mode, 'Flutter.xcframework', - builderXcodeArmDirectoryName, + 'ios-arm64_armv7', 'Flutter.framework', 'Flutter', ); @@ -309,7 +260,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, mode, 'device_info.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'device_info.framework', 'device_info', ); @@ -322,7 +273,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, mode, 'Reachability.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'Reachability.framework', 'Reachability', ); @@ -334,7 +285,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, mode, 'device_info.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'device_info.framework', 'Headers', 'DeviceInfoPlugin.h', @@ -345,7 +296,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, mode, 'device_info.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'dSYMs', 'device_info.framework.dSYM', )); @@ -378,7 +329,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, 'Release', 'device_info.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'BCSymbolMaps', )); @@ -392,7 +343,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, mode, 'FlutterPluginRegistrant.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'FlutterPluginRegistrant.framework', 'FlutterPluginRegistrant', ); @@ -402,7 +353,7 @@ Future _testBuildIosFramework(Directory projectDir, { bool isModule = fals outputPath, mode, 'FlutterPluginRegistrant.xcframework', - localXcodeArmDirectoryName, + 'ios-arm64_armv7', 'FlutterPluginRegistrant.framework', 'Headers', 'GeneratedPluginRegistrant.h',