1

该命令xctool -workspace Foo.xcworkspace -scheme Foo -sdk macosx -configuration Debug test -test-sdk macosx在本地工作并且所有测试都通过了。

使用 Travis 我收到以下错误:

Failed to query the list of test cases in the test bundle: dlopen(/Users/travis/Library/Developer/Xcode/DerivedData/Foo-bvxkmfrwzzvtxgaeoosknyzjovjc/Build/Products/Debug/OS X Tests.xctest/Contents/MacOS/OS X Tests, 2): Symbol not found: _NSURLSessionTransferSizeUnknown
  Referenced from: /Users/travis/Library/Developer/Xcode/DerivedData/Foo-bvxkmfrwzzvtxgaeoosknyzjovjc/Build/Products/Debug/OS X Tests.xctest/Contents/MacOS/OS X Tests
  Expected in: /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation
 in /Users/travis/Library/Developer/Xcode/DerivedData/Foo-bvxkmfrwzzvtxgaeoosknyzjovjc/Build/Products/Debug/OS X Tests.xctest/Contents/MacOS/OS X Tests
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
** TEST FAILED: 0 passed, 0 failed, 0 errored, 0 total ** (21121 ms)
The command "xctool -workspace Foo.xcworkspace -scheme Foo -sdk macosx -configuration Debug test -test-sdk macosx" exited with 1.

我的.travis.yml文件如下:

language: objective-c
before_install:
  - gem install cocoapods --no-ri --no-rdoc --no-document --quiet
  - brew update
  - brew uninstall xctool
  - brew install xctool
script:
  - xctool -workspace Foo.xcworkspace -scheme Foo -sdk macosx -configuration Debug test -test-sdk macosx

为什么会发生这种情况,我该如何解决?

4

1 回答 1

0

Travis 目前不支持 Mavericks,这是问题的根本原因。

GitHub 上的这个问题正在跟踪对 10.9 的支持。

于 2014-01-23T05:13:49.187 回答