2014-05-08 105 views
1

我想安裝特拉維斯來運行我現有的測試。我正在使用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) 

回答

2

這是比解答更多的解決方法。使用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

相關問題