我正在尝试设置travis以运行我现有的测试。我正在使用XCTest,并且可以使用xctool test
在本地成功运行测试。我已经设置了.xctool-args
文件,其中包含了所有需要的配置。在Travis上,构建完成了,但是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进行测试在本地工作,但在travis上使用xctool似乎有问题。我通过使用xcodebuild而不是使用xctool的默认测试脚本来解决我的问题。
language: objective-c
script:
- xcodebuild -scheme SchemeName -destination 'platform=iOS Simulator,name=iPhone Retina
(4-inch),OS=7.1' test