Skip to content

Commit

Permalink
Fix test debugging when test host is running
Browse files Browse the repository at this point in the history
Summary:
When debugging app tests locally it's possible to end a debugging session without actually stopping the test host app. This causes any subsequent test debug sessions to fail because during test setup the test host is "already running".

This diff changes the behavior so that during test debugging setup, if the test host app is already running, it will be relaunched. This fixes the cases where once the test host is running, debugging becomes impossible.

Differential Revision: D67115830

fbshipit-source-id: c5d0bb0e80e4e7cfa590d61ad6823830388aa268
  • Loading branch information
fbgerrit authored and facebook-github-bot committed Dec 12, 2024
1 parent a565f6d commit 872d121
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion XCTestBootstrap/Strategies/FBManagedTestRunStrategy.m
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ + (FBApplicationLaunchConfiguration *)prepareApplicationLaunchConfiguration:(FBA
environment:[self environmentFromConfiguration:testRunnerConfiguration environment:applicationLaunchConfiguration.environment]
waitForDebugger:applicationLaunchConfiguration.waitForDebugger
io:applicationLaunchConfiguration.io
launchMode:FBApplicationLaunchModeFailIfRunning];
launchMode:FBApplicationLaunchModeRelaunchIfRunning];
}

+ (NSArray<NSString *> *)argumentsFromConfiguration:(FBTestRunnerConfiguration *)configuration attributes:(NSArray<NSString *> *)attributes
Expand Down

0 comments on commit 872d121

Please sign in to comment.