我试图从终端运行单元测试,但每次都失败。以下消息是当我尝试在终端中运行otest时得到的消息。
objc[42339]: GC: forcing GC OFF because OBJC_DISABLE_GC is set
objc[42339]: found old-ABI metadata in image /Developer/Tools/otest !
Segmentation fault我需要Hudson集成的单元测试输出,并将iOS部署目标设置为4.2。这就是我要运行的代码。
export SDKROOT=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk
export BUILD_DIR=~/Documents/XCode/MyApp/build
export BUILD_PRODUCTS_DIR=~/Documents/XCode/MyApp/build/Debug-iphonesimulator
export DYLD_ROOT_PATH=$SDKROOT
export DYLD_FRAMEWORK_PATH=$BUILD_PRODUCTS_DIR:$SDKROOT
export IPHONE_SIMULATOR_ROOT=$SDKROOT
export CFFIXED_USER_HOME="~/Library/Application Support/iPhone Simulator/User/"
export OBJC_DISABLE_GC=YES
export DYLD_LIBRARY_PATH=$BUILD_PRODUCTS_DIR:$SDKROOT
export DYLD_NEW_LOCAL_SHARED_REGIONS=YES
export DYLD_NO_FIX_PREBINDING=YES
arch -i386 /Developer/Tools/otest MyApp.octest发布于 2011-02-03 01:44:45
bbum是正确的,我使用的是错误的 otest。Described here我需要运行以下命令
$ find /Developer -name otest
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.2.sdk/Developer/usr/bin/otest
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.0.sdk/Developer/usr/bin/otest
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/Developer/usr/bin/otest
/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/Developer/usr/bin/otest
/Developer/Tools/otest显然,通过输出,我为我的应用程序选择了正确的otest,并且它工作得很好。
https://stackoverflow.com/questions/4876818
复制相似问题