From ec1d27196ae76fe16e8e70d5d0f302c36758da0b Mon Sep 17 00:00:00 2001 From: Lawrence Lomax Date: Thu, 8 Jul 2021 07:38:11 -0700 Subject: [PATCH] Remove Shims from FBTestLaunchConfiguration Summary: There was only a single place where this was needed, and that was in the xcodebuild based execution. Here we can just make it an explicit parameter, and only when simulators w/ a custom device set are used. Reviewed By: jamescoggan Differential Revision: D29515500 fbshipit-source-id: d9bafc10bdfce4ef3c81489cb8dc3fd5b56cc63d --- .../Configuration/FBTestLaunchConfiguration.h | 8 +------ .../Configuration/FBTestLaunchConfiguration.m | 11 ++++------ .../Configuration/FBXCTraceConfiguration.h | 4 ++-- FBControlCore/Utility/FBXCTraceOperation.m | 5 +++-- .../Commands/FBDeviceXCTestCommands.m | 1 + FBSimulatorControl.xcodeproj/project.pbxproj | 4 ++-- .../Commands/FBSimulatorXCTestCommands.m | 21 ++++++++++++------- .../Fixtures/FBSimulatorControlFixtures.m | 6 ++---- .../FBSimulatorTestInjectionTests.m | 9 +++----- .../Utility/FBXcodeBuildOperation.h | 3 ++- .../Utility/FBXcodeBuildOperation.m | 8 +++---- .../Tests/FBXcodeBuildOperationTests.m | 3 +-- .../FBXCTestKit/Runners/FBTestRunStrategy.m | 3 +-- idb_companion/Utility/FBXCTestDescriptor.m | 6 ++---- 14 files changed, 41 insertions(+), 51 deletions(-) diff --git a/FBControlCore/Configuration/FBTestLaunchConfiguration.h b/FBControlCore/Configuration/FBTestLaunchConfiguration.h index 9912f5d8f..2e035f696 100644 --- a/FBControlCore/Configuration/FBTestLaunchConfiguration.h +++ b/FBControlCore/Configuration/FBTestLaunchConfiguration.h @@ -12,7 +12,6 @@ NS_ASSUME_NONNULL_BEGIN @class FBApplicationLaunchConfiguration; -@class FBXCTestShimConfiguration; /** A Value object with the information required to launch a XCTest. @@ -22,7 +21,7 @@ NS_ASSUME_NONNULL_BEGIN /** The Designated Initializer */ -- (instancetype)initWithTestBundlePath:(NSString *)testBundlePath applicationLaunchConfiguration:(FBApplicationLaunchConfiguration *)applicationLaunchConfiguration testHostPath:(nullable NSString *)testHostPath timeout:(NSTimeInterval)timeout initializeUITesting:(BOOL)initializeUITesting useXcodebuild:(BOOL)useXcodebuild testsToRun:(nullable NSSet *)testsToRun testsToSkip:(nullable NSSet *)testsToSkip targetApplicationPath:(nullable NSString *)targetApplicationPath targetApplicationBundleID:(nullable NSString *)targetApplicaitonBundleID xcTestRunProperties:(nullable NSDictionary *)xcTestRunProperties resultBundlePath:(nullable NSString *)resultBundlePath reportActivities:(BOOL)reportActivities coveragePath:(nullable NSString *)coveragePath logDirectoryPath:(nullable NSString *)logDirectoryPath shims:(nullable FBXCTestShimConfiguration *)shims; +- (instancetype)initWithTestBundlePath:(NSString *)testBundlePath applicationLaunchConfiguration:(FBApplicationLaunchConfiguration *)applicationLaunchConfiguration testHostPath:(nullable NSString *)testHostPath timeout:(NSTimeInterval)timeout initializeUITesting:(BOOL)initializeUITesting useXcodebuild:(BOOL)useXcodebuild testsToRun:(nullable NSSet *)testsToRun testsToSkip:(nullable NSSet *)testsToSkip targetApplicationPath:(nullable NSString *)targetApplicationPath targetApplicationBundleID:(nullable NSString *)targetApplicaitonBundleID xcTestRunProperties:(nullable NSDictionary *)xcTestRunProperties resultBundlePath:(nullable NSString *)resultBundlePath reportActivities:(BOOL)reportActivities coveragePath:(nullable NSString *)coveragePath logDirectoryPath:(nullable NSString *)logDirectoryPath; /** Path to XCTest bundle used for testing @@ -99,11 +98,6 @@ NS_ASSUME_NONNULL_BEGIN */ @property (nonatomic, nullable, copy, readonly) NSString *logDirectoryPath; -/** - Shims to be applied to test execution - */ -@property (nonatomic, copy, readonly, nullable) FBXCTestShimConfiguration *shims; - @end NS_ASSUME_NONNULL_END diff --git a/FBControlCore/Configuration/FBTestLaunchConfiguration.m b/FBControlCore/Configuration/FBTestLaunchConfiguration.m index 719b56ce0..1ff96be29 100644 --- a/FBControlCore/Configuration/FBTestLaunchConfiguration.m +++ b/FBControlCore/Configuration/FBTestLaunchConfiguration.m @@ -17,7 +17,7 @@ @implementation FBTestLaunchConfiguration -- (instancetype)initWithTestBundlePath:(NSString *)testBundlePath applicationLaunchConfiguration:(FBApplicationLaunchConfiguration *)applicationLaunchConfiguration testHostPath:(NSString *)testHostPath timeout:(NSTimeInterval)timeout initializeUITesting:(BOOL)initializeUITesting useXcodebuild:(BOOL)useXcodebuild testsToRun:(NSSet *)testsToRun testsToSkip:(NSSet *)testsToSkip targetApplicationPath:(NSString *)targetApplicationPath targetApplicationBundleID:(NSString *)targetApplicaitonBundleID xcTestRunProperties:(NSDictionary *)xcTestRunProperties resultBundlePath:(NSString *)resultBundlePath reportActivities:(BOOL)reportActivities coveragePath:(NSString *)coveragePath logDirectoryPath:(nullable NSString *)logDirectoryPath shims:(FBXCTestShimConfiguration *)shims +- (instancetype)initWithTestBundlePath:(NSString *)testBundlePath applicationLaunchConfiguration:(FBApplicationLaunchConfiguration *)applicationLaunchConfiguration testHostPath:(NSString *)testHostPath timeout:(NSTimeInterval)timeout initializeUITesting:(BOOL)initializeUITesting useXcodebuild:(BOOL)useXcodebuild testsToRun:(NSSet *)testsToRun testsToSkip:(NSSet *)testsToSkip targetApplicationPath:(NSString *)targetApplicationPath targetApplicationBundleID:(NSString *)targetApplicaitonBundleID xcTestRunProperties:(NSDictionary *)xcTestRunProperties resultBundlePath:(NSString *)resultBundlePath reportActivities:(BOOL)reportActivities coveragePath:(NSString *)coveragePath logDirectoryPath:(nullable NSString *)logDirectoryPath { self = [super init]; if (!self) { @@ -39,7 +39,6 @@ - (instancetype)initWithTestBundlePath:(NSString *)testBundlePath applicationLau _reportActivities = reportActivities; _coveragePath = coveragePath; _logDirectoryPath = logDirectoryPath; - _shims = shims; return self; } @@ -61,7 +60,6 @@ - (BOOL)isEqual:(FBTestLaunchConfiguration *)configuration return (self.testBundlePath == configuration.testBundlePath || [self.testBundlePath isEqualToString:configuration.testBundlePath]) && (self.applicationLaunchConfiguration == configuration.applicationLaunchConfiguration || [self.applicationLaunchConfiguration isEqual:configuration.applicationLaunchConfiguration]) && - (self.shims == configuration.shims || [self.shims isEqual:configuration.shims]) && (self.testHostPath == configuration.testHostPath || [self.testHostPath isEqualToString:configuration.testHostPath]) && (self.targetApplicationBundleID == configuration.targetApplicationBundleID || [self.targetApplicationBundleID isEqualToString:configuration.targetApplicationBundleID]) && (self.targetApplicationPath == configuration.targetApplicationPath || [self.targetApplicationPath isEqualToString:configuration.targetApplicationPath]) && @@ -78,13 +76,13 @@ - (BOOL)isEqual:(FBTestLaunchConfiguration *)configuration - (NSUInteger)hash { - return self.testBundlePath.hash ^ self.applicationLaunchConfiguration.hash ^ self.testHostPath.hash ^ (unsigned long) self.timeout ^ (unsigned long) self.shouldInitializeUITesting ^ (unsigned long) self.shouldUseXcodebuild ^ self.testsToRun.hash ^ self.testsToSkip.hash ^ self.targetApplicationPath.hash ^ self.targetApplicationBundleID.hash ^ self.xcTestRunProperties.hash ^ self.resultBundlePath.hash ^ self.coveragePath.hash ^ self.logDirectoryPath.hash ^ self.shims.hash; + return self.testBundlePath.hash ^ self.applicationLaunchConfiguration.hash ^ self.testHostPath.hash ^ (unsigned long) self.timeout ^ (unsigned long) self.shouldInitializeUITesting ^ (unsigned long) self.shouldUseXcodebuild ^ self.testsToRun.hash ^ self.testsToSkip.hash ^ self.targetApplicationPath.hash ^ self.targetApplicationBundleID.hash ^ self.xcTestRunProperties.hash ^ self.resultBundlePath.hash ^ self.coveragePath.hash ^ self.logDirectoryPath.hash; } - (NSString *)description { return [NSString stringWithFormat: - @"FBTestLaunchConfiguration TestBundlePath %@ | AppConfig %@ | HostPath %@ | UITesting %d | UseXcodebuild %d | TestsToRun %@ | TestsToSkip %@ | Target application path %@ | Target application bundle id %@ xcTestRunProperties %@ | ResultBundlePath %@ | CollectCoverage %@ | LogDirectoryPath %@ | Shims %@" , + @"FBTestLaunchConfiguration TestBundlePath %@ | AppConfig %@ | HostPath %@ | UITesting %d | UseXcodebuild %d | TestsToRun %@ | TestsToSkip %@ | Target application path %@ | Target application bundle id %@ xcTestRunProperties %@ | ResultBundlePath %@ | CollectCoverage %@ | LogDirectoryPath %@" , self.testBundlePath, self.applicationLaunchConfiguration, self.testHostPath, @@ -97,8 +95,7 @@ - (NSString *)description self.xcTestRunProperties, self.resultBundlePath, self.coveragePath, - self.logDirectoryPath, - self.shims + self.logDirectoryPath ]; } diff --git a/FBControlCore/Configuration/FBXCTraceConfiguration.h b/FBControlCore/Configuration/FBXCTraceConfiguration.h index fdcb71e85..61f168437 100644 --- a/FBControlCore/Configuration/FBXCTraceConfiguration.h +++ b/FBControlCore/Configuration/FBXCTraceConfiguration.h @@ -7,10 +7,10 @@ #import -#import "FBXCTestShimConfiguration.h" - NS_ASSUME_NONNULL_BEGIN +@class FBXCTestShimConfiguration; + /** A Value object with the information required to run `xctrace record` */ diff --git a/FBControlCore/Utility/FBXCTraceOperation.m b/FBControlCore/Utility/FBXCTraceOperation.m index 7f9ea93b2..4370d9b53 100644 --- a/FBControlCore/Utility/FBXCTraceOperation.m +++ b/FBControlCore/Utility/FBXCTraceOperation.m @@ -12,11 +12,12 @@ #import "FBControlCoreLogger.h" #import "FBDataConsumer.h" #import "FBFuture.h" -#import "FBXcodeConfiguration.h" -#import "FBXCTraceConfiguration.h" #import "FBiOSTarget.h" #import "FBTask+Helpers.h" #import "FBTaskBuilder.h" +#import "FBXcodeConfiguration.h" +#import "FBXCTestShimConfiguration.h" +#import "FBXCTraceConfiguration.h" const NSTimeInterval DefaultXCTraceRecordOperationTimeLimit = 4 * 60 * 60; // 4h const NSTimeInterval DefaultXCTraceRecordStopTimeout = 600.0; // 600s diff --git a/FBDeviceControl/Commands/FBDeviceXCTestCommands.m b/FBDeviceControl/Commands/FBDeviceXCTestCommands.m index 82d1ed755..f289110d5 100644 --- a/FBDeviceControl/Commands/FBDeviceXCTestCommands.m +++ b/FBDeviceControl/Commands/FBDeviceXCTestCommands.m @@ -110,6 +110,7 @@ - (instancetype)initWithDevice:(FBDevice *)device workingDirectory:(NSString *)w xcodeBuildPath:xcodeBuildPath testRunFilePath:filePath simDeviceSet:nil + macOSTestShimPath:nil queue:self.device.workQueue logger:[logger withName:@"xcodebuild"]]; } diff --git a/FBSimulatorControl.xcodeproj/project.pbxproj b/FBSimulatorControl.xcodeproj/project.pbxproj index 8b8335804..39257fe3a 100644 --- a/FBSimulatorControl.xcodeproj/project.pbxproj +++ b/FBSimulatorControl.xcodeproj/project.pbxproj @@ -170,7 +170,7 @@ AA5449951CFF4A6700443C2F /* FBiOSTargetConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = AA5449931CFF4A6700443C2F /* FBiOSTargetConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; AA5449961CFF4A6700443C2F /* FBiOSTargetConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = AA5449941CFF4A6700443C2F /* FBiOSTargetConfiguration.m */; }; AA54EC7D25ED4C6200FAA59E /* FBProcessSpawnCommands.h in Headers */ = {isa = PBXBuildFile; fileRef = AA54EC7C25ED4C6200FAA59E /* FBProcessSpawnCommands.h */; settings = {ATTRIBUTES = (Public, ); }; }; - AA5639551C060005009BAFAA /* FBSimulatorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = AA5639541C05FFF5009BAFAA /* FBSimulatorControl.h */; }; + AA5639551C060005009BAFAA /* FBSimulatorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = AA5639541C05FFF5009BAFAA /* FBSimulatorControl.h */; settings = {ATTRIBUTES = (Public, ); }; }; AA56445E1E5F6ED0006C1077 /* FBSimulatorKeychainCommands.h in Headers */ = {isa = PBXBuildFile; fileRef = AA56445C1E5F6ED0006C1077 /* FBSimulatorKeychainCommands.h */; settings = {ATTRIBUTES = (Public, ); }; }; AA56445F1E5F6ED0006C1077 /* FBSimulatorKeychainCommands.m in Sources */ = {isa = PBXBuildFile; fileRef = AA56445D1E5F6ED0006C1077 /* FBSimulatorKeychainCommands.m */; }; AA56EAF01EEFCA400062C2BC /* libMaculator.dylib in Resources */ = {isa = PBXBuildFile; fileRef = AA56EAEE1EEFCA340062C2BC /* libMaculator.dylib */; }; @@ -421,7 +421,7 @@ AACC503C1EAA230F0034A987 /* FBVideoStreamConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = AACC503A1EAA230F0034A987 /* FBVideoStreamConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; AACC503D1EAA230F0034A987 /* FBVideoStreamConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = AACC503B1EAA230F0034A987 /* FBVideoStreamConfiguration.m */; }; AAD064AC25E3FA9D00FCFC7F /* FBXCTestReporterDouble.m in Sources */ = {isa = PBXBuildFile; fileRef = AAD064AB25E3FA9D00FCFC7F /* FBXCTestReporterDouble.m */; }; - AAD288011D586D6C00981DFC /* FBSimulatorSubprocessTerminationStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = AAD287FF1D586D6C00981DFC /* FBSimulatorSubprocessTerminationStrategy.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AAD288011D586D6C00981DFC /* FBSimulatorSubprocessTerminationStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = AAD287FF1D586D6C00981DFC /* FBSimulatorSubprocessTerminationStrategy.h */; }; AAD288021D586D6C00981DFC /* FBSimulatorSubprocessTerminationStrategy.m in Sources */ = {isa = PBXBuildFile; fileRef = AAD288001D586D6C00981DFC /* FBSimulatorSubprocessTerminationStrategy.m */; }; AAD305201BD4D5B10047376E /* photo1.png in Resources */ = {isa = PBXBuildFile; fileRef = AAD3051E1BD4D5B10047376E /* photo1.png */; }; AAD4B11F24892F350021487B /* FBAMDeviceManager.h in Headers */ = {isa = PBXBuildFile; fileRef = AAD4B11D24892F350021487B /* FBAMDeviceManager.h */; }; diff --git a/FBSimulatorControl/Commands/FBSimulatorXCTestCommands.m b/FBSimulatorControl/Commands/FBSimulatorXCTestCommands.m index 399065c83..72085d385 100644 --- a/FBSimulatorControl/Commands/FBSimulatorXCTestCommands.m +++ b/FBSimulatorControl/Commands/FBSimulatorXCTestCommands.m @@ -203,14 +203,19 @@ - (NSString *)xctestPath return [FBSimulatorError failFutureWithError:error]; } - return [FBXcodeBuildOperation - operationWithUDID:self.simulator.udid - configuration:configuration - xcodeBuildPath:xcodeBuildPath - testRunFilePath:filePath - simDeviceSet:self.simulator.customDeviceSetPath - queue:self.simulator.workQueue - logger:[logger withName:@"xcodebuild"]]; + return [[FBXCTestShimConfiguration + defaultShimConfigurationWithLogger:self.simulator.logger] + onQueue:self.simulator.asyncQueue fmap:^(FBXCTestShimConfiguration *shims) { + return [FBXcodeBuildOperation + operationWithUDID:self.simulator.udid + configuration:configuration + xcodeBuildPath:xcodeBuildPath + testRunFilePath:filePath + simDeviceSet:self.simulator.customDeviceSetPath + macOSTestShimPath:shims.macOSTestShimPath + queue:self.simulator.workQueue + logger:[logger withName:@"xcodebuild"]]; + }]; } - (FBFuture *)_testOperationStarted:(FBTask *)task configuration:(FBTestLaunchConfiguration *)configuration reporter:(id)reporter logger:(id)logger diff --git a/FBSimulatorControlTests/Fixtures/FBSimulatorControlFixtures.m b/FBSimulatorControlTests/Fixtures/FBSimulatorControlFixtures.m index 5e5f5e40d..17a2d2e01 100644 --- a/FBSimulatorControlTests/Fixtures/FBSimulatorControlFixtures.m +++ b/FBSimulatorControlTests/Fixtures/FBSimulatorControlFixtures.m @@ -72,8 +72,7 @@ - (FBTestLaunchConfiguration *)testLaunchTableSearch resultBundlePath:nil reportActivities:NO coveragePath:nil - logDirectoryPath:nil - shims:nil]; + logDirectoryPath:nil]; } - (FBTestLaunchConfiguration *)testLaunchSafari @@ -93,8 +92,7 @@ - (FBTestLaunchConfiguration *)testLaunchSafari resultBundlePath:nil reportActivities:NO coveragePath:nil - logDirectoryPath:nil - shims:nil]; + logDirectoryPath:nil]; } - (FBBundleDescriptor *)tableSearchApplication diff --git a/FBSimulatorControlTests/Tests/Integration/FBSimulatorTestInjectionTests.m b/FBSimulatorControlTests/Tests/Integration/FBSimulatorTestInjectionTests.m index a32d27a9d..e757db442 100644 --- a/FBSimulatorControlTests/Tests/Integration/FBSimulatorTestInjectionTests.m +++ b/FBSimulatorControlTests/Tests/Integration/FBSimulatorTestInjectionTests.m @@ -107,8 +107,7 @@ - (void)testInjectsApplicationTestWithCustomOutputConfiguration resultBundlePath:nil reportActivities:NO coveragePath:nil - logDirectoryPath:nil - shims:nil]; + logDirectoryPath:nil]; FBSimulator *simulator = [self assertObtainsBootedSimulator]; [self assertLaunchesTestWithConfiguration:testLaunch reporter:self simulator:simulator]; @@ -145,8 +144,7 @@ - (void)testInjectsApplicationTestWithTestsToRun resultBundlePath:nil reportActivities:NO coveragePath:nil - logDirectoryPath:nil - shims:nil]; + logDirectoryPath:nil]; [self assertLaunchesTestWithConfiguration:testLaunch reporter:self simulator:simulator]; [self assertPassed:@[@"testIsRunningOnIOS"] @@ -171,8 +169,7 @@ - (void)testInjectsApplicationTestWithTestsToSkip resultBundlePath:nil reportActivities:NO coveragePath:nil - logDirectoryPath:nil - shims:nil]; + logDirectoryPath:nil]; [self assertLaunchesTestWithConfiguration:testLaunch reporter:self simulator:simulator]; [self assertPassed:@[@"testIsRunningInIOSApp", @"testHostProcessIsMobileSafari", @"testPossibleCrashingOfHostProcess", @"testPossibleStallingOfHostProcess", @"testWillAlwaysPass"] diff --git a/XCTestBootstrap/Utility/FBXcodeBuildOperation.h b/XCTestBootstrap/Utility/FBXcodeBuildOperation.h index b73413f8b..4978a0f01 100644 --- a/XCTestBootstrap/Utility/FBXcodeBuildOperation.h +++ b/XCTestBootstrap/Utility/FBXcodeBuildOperation.h @@ -30,11 +30,12 @@ NS_ASSUME_NONNULL_BEGIN @param xcodeBuildPath the path to xcodebuild. @param testRunFilePath the path to the xcodebuild.xctestrun file @param simDeviceSetPath an optional path to the simulator device set + @param macOSTestShimPath this should be provided if simDeviceSetPath is non-nil @param queue the queue to use for serialization. @param logger the logger to log to. @return a future that resolves when the task has launched. */ -+ (FBFuture *)operationWithUDID:(NSString *)udid configuration:(FBTestLaunchConfiguration *)configuration xcodeBuildPath:(NSString *)xcodeBuildPath testRunFilePath:(NSString *)testRunFilePath simDeviceSet:(nullable NSString *)simDeviceSetPath queue:(dispatch_queue_t)queue logger:(nullable id)logger; ++ (FBFuture *)operationWithUDID:(NSString *)udid configuration:(FBTestLaunchConfiguration *)configuration xcodeBuildPath:(NSString *)xcodeBuildPath testRunFilePath:(NSString *)testRunFilePath simDeviceSet:(nullable NSString *)simDeviceSetPath macOSTestShimPath:(nullable NSString *)macOSTestShimPath queue:(dispatch_queue_t)queue logger:(nullable id)logger; #pragma mark Public Methods diff --git a/XCTestBootstrap/Utility/FBXcodeBuildOperation.m b/XCTestBootstrap/Utility/FBXcodeBuildOperation.m index a9b5d9a27..10648609c 100644 --- a/XCTestBootstrap/Utility/FBXcodeBuildOperation.m +++ b/XCTestBootstrap/Utility/FBXcodeBuildOperation.m @@ -17,7 +17,7 @@ @implementation FBXcodeBuildOperation -+ (FBFuture *)operationWithUDID:(NSString *)udid configuration:(FBTestLaunchConfiguration *)configuration xcodeBuildPath:(NSString *)xcodeBuildPath testRunFilePath:(NSString *)testRunFilePath simDeviceSet:(nullable NSString *)simDeviceSetPath queue:(dispatch_queue_t)queue logger:(nullable id)logger ++ (FBFuture *)operationWithUDID:(NSString *)udid configuration:(FBTestLaunchConfiguration *)configuration xcodeBuildPath:(NSString *)xcodeBuildPath testRunFilePath:(NSString *)testRunFilePath simDeviceSet:(NSString *)simDeviceSetPath macOSTestShimPath:(NSString *)macOSTestShimPath queue:(dispatch_queue_t)queue logger:(nullable id)logger { NSMutableArray *arguments = [[NSMutableArray alloc] init]; [arguments addObjectsFromArray:@[ @@ -47,15 +47,15 @@ @implementation FBXcodeBuildOperation // Add environments for xcodebuild method swizzling if a simulator device set is provided if (simDeviceSetPath) { - if (!configuration.shims || !configuration.shims.macOSTestShimPath) { + if (!macOSTestShimPath) { return [[XCTestBootstrapError describe:@"Failed to locate the shim file for xcodebuild method swizzling"] failFuture]; } environment[XcodebuildEnvironmentDeviceSetPath] = simDeviceSetPath; if (environment[XcodebuildEnvironmentInsertDylib]) { - environment[XcodebuildEnvironmentInsertDylib] = [NSString stringWithFormat:@"%@%@%@", environment[XcodebuildEnvironmentInsertDylib], @":", configuration.shims.macOSTestShimPath]; + environment[XcodebuildEnvironmentInsertDylib] = [NSString stringWithFormat:@"%@%@%@", environment[XcodebuildEnvironmentInsertDylib], @":", macOSTestShimPath]; } else { - environment[XcodebuildEnvironmentInsertDylib] = configuration.shims.macOSTestShimPath; + environment[XcodebuildEnvironmentInsertDylib] = macOSTestShimPath; } } diff --git a/XCTestBootstrapTests/Tests/FBXcodeBuildOperationTests.m b/XCTestBootstrapTests/Tests/FBXcodeBuildOperationTests.m index e9ea0ee13..6ee2b5519 100644 --- a/XCTestBootstrapTests/Tests/FBXcodeBuildOperationTests.m +++ b/XCTestBootstrapTests/Tests/FBXcodeBuildOperationTests.m @@ -44,8 +44,7 @@ - (void)testUITestConfiguration resultBundlePath:nil reportActivities:NO coveragePath:nil - logDirectoryPath:nil - shims:nil]; + logDirectoryPath:nil]; NSDictionary *properties = [FBXcodeBuildOperation xctestRunProperties:configuration]; NSDictionary *stubBundleProperties = properties[@"StubBundleId"]; diff --git a/fbxctest/FBXCTestKit/Runners/FBTestRunStrategy.m b/fbxctest/FBXCTestKit/Runners/FBTestRunStrategy.m index e58877b20..574e2ae70 100644 --- a/fbxctest/FBXCTestKit/Runners/FBTestRunStrategy.m +++ b/fbxctest/FBXCTestKit/Runners/FBTestRunStrategy.m @@ -97,8 +97,7 @@ - (instancetype)initWithTarget:(id)target resultBundlePath:nil reportActivities:NO coveragePath:nil - logDirectoryPath:nil - shims:nil]; + logDirectoryPath:nil]; __block id tailLogOperation = nil; FBFuture *executionFinished = [FBManagedTestRunStrategy diff --git a/idb_companion/Utility/FBXCTestDescriptor.m b/idb_companion/Utility/FBXCTestDescriptor.m index d764a8b8c..dd06a7f23 100644 --- a/idb_companion/Utility/FBXCTestDescriptor.m +++ b/idb_companion/Utility/FBXCTestDescriptor.m @@ -530,8 +530,7 @@ - (NSSet *)architectures resultBundlePath:nil reportActivities:request.reportActivities coveragePath:coveragePath - logDirectoryPath:logsDirectory - shims:nil]; + logDirectoryPath:logsDirectory]; }]; } @@ -624,8 +623,7 @@ - (NSSet *)architectures resultBundlePath:resultBundlePath reportActivities:request.reportActivities coveragePath:nil - logDirectoryPath:nil - shims:shims]; + logDirectoryPath:nil]; }]; }