我有一个Mac应用程序,它是在64位Mac上使用i386架构构建的。最近我在Xcode项目中添加了测试用例(XCTest)来测试项目,当我使用Xcode启动测试时,一切正常。但是当我尝试在命令行上运行测试用例时,我得到的错误是抱怨构建测试的架构不匹配以及我正在运行的机器的不匹配。
/Applications/Xcode5.app/Contents/Developer/usr/bin/xctest -XCTest MyTests.xctest
2014-02-11 14:58:23.600 xctest[57952:707] The test bundle at /Users/myself/Library/Developer/Xcode/DerivedData/MyAppMac-elsbcgzhxehizognmveiiwsqvusx/Build/Products/Debug/MyTests.xctest could not be loaded because it is built for a different architecture than the currently-running test rig (which is running as x86_64).
2014-02-11 14:58:23.603 xctest[57953:203] *** NSTask: Task create for path '/Users/myself/Library/Developer/Xcode/DerivedData/MyAppMac-elsbcgzhxehizognmveiiwsqvusx/Build/Products/Debug/MyTests.xctest/Contents/MacOS/MyTests' failed: 22, "Invalid argument". Terminating temporary process.
测试用例也使用architecture = i386
构建任何见解都会有所帮助,
由于
答案 0 :(得分:0)