I'm trying to use xctool
to run my Xcode unit tests from a Jenkins server for CI purposes. When I run my tests via:
xctool -project MyApp.xcodeproj -scheme MyApp test -sdk iphonesimulator
I get the following error:
/Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/MyApp-fxgsgucvulucjcbkdjllermhnvah/Build/Intermediates/MyApp.build/Debug-iphonesimulator/MyAppTests.build/Script-FA92AE8E162C5E1900A410A1.sh: line 3: 10301 Segmentation fault: 11 "${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
Command /bin/sh failed with exit code 139
If I remove the default Run Script
that has:
# Run the unit tests in this test bundle.
"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests"
from my Test target, the call to xctool
works fine -- and I can still run my unit tests directly in Xcode via Cmd+U
.
I've waded through a lot of searches trying to find the "correct" solution to this but haven't had any luck. Is simply removing that default post build step that calls RunUnitTests
acceptable? What does that even do?