Summary: I'm Using OCUnit on Intel. How do I also run my unit tests
under Rosetta?
I've got an XCode project with Unit Tests, as documented in:
Test Driving Your Code with OCUnit
http://developer.apple.com/tools/unittest.html
When I add the Unit Test target, Xcode modifies the build steps of my
app, adding a Run Script phase which does:
"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
Now, according to the man page for RunUnitTests, on Leopard,
RunUnitTests looks at the environment variable ARCHS.
and in fact, when I modify the Run Script phase to:
"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
ARCHS=ppc;export ARCHS
"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
the build log says:
Now Running i386 tests
.....
Now Running ppc tests
This is all as it should be, BUT: when I actually write an architecture
dependent test, I discover that RunUnitTests lies. I verified that my
unit test bundle IS being built Universal (by default it is
${NATIVE_ARCH}).
My question: What must I do so that my unit tests run, as part of an
Xcode build, both Intel, and PowerPC (i.e. Rosetta), when I'm building
on a Intel machine?
Extra credit: How about Intel-32, Intel-64, PowerPC-32, PowerPC-64?