This repository has been archived by the owner on Feb 2, 2021. It is now read-only.
force otest-query for application tests to use the i386 flavor of the TEST_HOST #200
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the problem where xctool would fail to query the list of
tests cases in the best bundle. i.e. --
The problem was that, if the .app was built using ONLY_ACTIVE_ARCH=NO,
the .app would actually be Universal with x86_64 and i386 versions.
When we would launch the app with otest-query-ios-dylib injected, it
would crash since the x86_64 flavor of the .app was being launched, but
the dylib is i386 only.
The right thing to do here is just force the .app launch to be
i386-only. Even though you CAN trick Xcode/xcodebuild/xctool into
building Universal versions of simulator apps, Xcode.app will only ever
run the i386 versions of your .apps and test bundles. It does not care
if your binary is universal - xctool should follow suit.
Test Plan:
Created a test project as per @sandervandenbrink's comment --
@#170 (comment)
Ran the following and observed things crashed --
Applied the fix, and ran the same command and observed things now
worked.