facebook/xctool — pull request #200 by fpotter (2013-10-11 00:28:38+00:00)
Title: force otest-query for application tests to use the i386 flavor of the TEST_HOST

This fixes the problem where xctool would fail to query the list of
tests cases in the best bundle. i.e. --

```
failed: Failed to query the list of test cases in the test bundle: dyld:
could not load inserted library:
/usr/local/Cellar/xctool/0.1.13/libexec/lib/otest-query-ios-dylib.dylib
```

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 --
@https://github.com/facebook/xctool/issues/170#issuecomment-25954827

Ran the following and observed things crashed --

```
xctool -project foo.xcodeproj -scheme foo -sdk iphonesimulator7.0 ONLY_ACTIVE_ARCH=NO clean test
```

Applied the fix, and ran the same command and observed things now
worked.