当特拉维斯试图运行测试时XCTest崩溃

问题描述:

我想安装特拉维斯来运行我现有的测试。我正在使用XCTest,并可以使用xctool test在本地成功运行测试。我有.xctool-args文件设置与所有需要的配置。在Travis上,构建完成,但xctest正在崩溃。这里是崩溃日志当特拉维斯试图运行测试时XCTest崩溃

Test did not run: the test bundle stopped running or crashed before the test suite started. 
CRASH REPORT: xctest_2014-05-07-064505_Traviss-Mac-32.crash 
Process:   xctest [1517] 
Path:   /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/Developer/usr/bin/xctest 
Identifier:  xctest 
Version:   13.2 
Code Type:  X86 (Native) 
Parent Process: sim [1514] 
Responsible:  xctest [1517] 
User ID:   501 
Date/Time:  2014-05-07 06:44:57.294 -0700 
OS Version:  Mac OS X 10.9.2 (13C64) 
Report Version: 11 
Anonymous UUID: AFA30136-CB6D-6480-DAA2-9E74869E8355 
Crashed Thread: 8 Dispatch queue: com.apple.root.default-priority 
Exception Type: EXC_BAD_ACCESS (SIGSEGV) 
Exception Codes: KERN_INVALID_ADDRESS at 0x00000000704f535a 
VM Regions Near 0x704f535a: 
    __LINKEDIT    000000002010d000-0000000020113000 [ 24K] r--/rwx SM=COW /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/Developer/Library/Frameworks/XCTest.framework/XCTest 
--> 
    __TEXT     000000008fef2000-000000008ff25000 [ 204K] r-x/rwx SM=COW /usr/lib/dyld 
Application Specific Information: 
objc_msgSend() selector name: reachabilityRef 
iPhone Simulator (external launch) , iPhone OS 7.1 (unknown/11D167) 

这是比解答更多的解决方法。使用xctool进行本地测试,但似乎在xterm的travis上存在问题。我通过使用xcodebuild而不是使用xctool的默认测试脚本解决了我的问题。

language: objective-c 
script: 
- xcodebuild -scheme SchemeName -destination 'platform=iOS Simulator,name=iPhone Retina 
    (4-inch),OS=7.1' test 
+0

Hoorah!最后让Travis以这种方式工作。我认为现在没有理由使用xctool。 – phatmann