I have Jenkins with the Xcode plugin configured to run unit tests by adding the test build action to the Custom xcodebuild arguments setting. For more information on getting Jen
Thanks to this answer, I discovered a way to essentially disable buffering using the script
command.
script -q -t 0 xcodebuild.out \
xcodebuild \
-workspace project.xcworkspace \
-scheme Tests \
-configuration Release \
-sdk iphonesimulator7.0 \
-destination "platform=iOS Simulator,name=iPhone Retina (4-inch),OS=latest" \
test
cat xcodebuild.out
As noted by Malte in a comment above, a cleaner solution might be
env NSUnbufferedIO=YES xcodebuild ...