首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >运行otest会在映像中找到旧的ABI元数据

运行otest会在映像中找到旧的ABI元数据
EN

Stack Overflow用户
提问于 2011-02-03 00:10:13
回答 1查看 205关注 0票数 0

我试图从终端运行单元测试,但每次都失败。以下消息是当我尝试在终端中运行otest时得到的消息。

代码语言:javascript
复制
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。这就是我要运行的代码。

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2011-02-03 01:44:45

bbum是正确的,我使用的是错误的 otestDescribed here我需要运行以下命令

代码语言:javascript
复制
$ 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,并且它工作得很好。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4876818

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档