-
Notifications
You must be signed in to change notification settings - Fork 737
xctool cannot run tests against the "iPhone Retina (4-inch 64-bit)" simulator #204
Comments
Using DVTiPhoneSimulatorRemoteClient.framework expose setting the arch, right? |
A PR for building universal binaries is up: #211 |
A PR for using * DVTiPhoneSimulatorRemoteClient.framework* is up: #212 |
@fpotter I think we can set the deviceInfo without using the distributed notification using some CF functions: If this works, this means we don't have to fight with DVTiPhoneSimulatorRemoteClient.framework and also don't have to manually broadcast NSDistributedNotification's. Yay! |
Check out the referenced commit -- It works! (Although it's pretty dirty ...)
I don't know if this is a solution we want to pursue, but it's an option. |
@fpotter for logic tests, when do we force 64-bit? (Is the |
#217 enables 64-bit application tests. |
Yeah, I think destination will have to be used for logic tests, too - we'll look at it to decide whether or not to force 64-bit. You could double check with ... |
Oh man. You scared me for a sec. Fortunately, the name is actually More importantly, it looks like xcodebuild also blindly splits on the comma. :) |
@fpotter it seems like running |
Yeah, the -destination does set the arch. We'll have to force the arch depending on the -destination. |
closing - i think @ryanrhee land this already. |
When passing
-destination "name=iPhone Retina (4-inch 64-bit)"
toxcodebuild ... test
, xcodebuild will run tests as x86_64. xctool needs to do the same.To fix, we need do a few things...
Make otest-query + otest-shim Universal binaries with i386 + x86_64 flavors.
Find a way to determine if a destination value refers to 64-bit or 32-bit arch. It looks like we can examine the plist for the named device (e.g. /Applications/Xcode.app/Contents/Developer/Library/PrivateFrameworks/SimulatorHost.framework/Versions/A/Resources/Devices/iPhone (Retina 4-inch 64-bit).deviceinfo/Info.plist), and look for
wordSize=64
in the dictionary.When running logic tests, we need to force the x86_64 arch via
-[NSConcreteTask setPreferredArchitectures:]
.When running applications tests, we need to launch the simulator in the correct 64-bit mode.
When watching Xcode.app post distributed notifications to the simulator, we can see that it's passing
arch=x86_64
anddeviceInfo=iPhone Retina (4-inch 64-bit)
in the com.apple.iphonesimulator.startSession message (see https://gist.github.com/fpotter/6941760). xctool needs to do the same.This will be a little tricky. xctool uses iPhoneSimulatorRemoteClient.framework to interact with the sim, but it doesn't expose a way to set the arch or deviceInfo fields of that distribution notification. We'll have to trick it into doing so, probably with some swizzling.
The text was updated successfully, but these errors were encountered: