xcodebuild corrupts test result output when output redirected to file

南笙酒味 提交于 2019-12-03 03:22:58
icecrystal23

As noted by Malte in a comment above, a cleaner solution might be

    env NSUnbufferedIO=YES xcodebuild ...
GBegen

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
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!