objective-c - Objective-C Travis 因“测试运行程序在开始测试执行之前退出”而失败
问题描述
这是我在.travis.yml
文件中的代码,运行构建通过后,但我发现测试失败。我对此一无所知,并阻止了我几天,感谢您的帮助。谢谢
--- 错误如下 ---
2018-12-20 05:57:42.698 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: (CB8F382A-5B77-4BDA-BC4F-6EDF7B7DB822)
Beginning test session aaaaTests-CB8F382A-5B77-4BDA-BC4F-6EDF7B7DB822 at 2018-
12-20 05:57:42.698 with Xcode 10A255 on target <DVTiPhoneSimulator:
0x7f86387e49d0> {
SimDevice: iPhone 6 (B25EC6DB-0B2F-4920-B6C2-8560331BA779, iOS 9.1, Booted)
} (9.1 (13B143))
2018-12-20 05:57:53.744 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: 11.068 elapsed -- Testing started completed.
2018-12-20 05:57:53.744 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2018-12-20 05:57:53.744 xcodebuild[2394:8186] [MT]
IDETestOperationsObserverDebug: 11.068 sec, +11.068 sec -- end
2018-12-20 05:57:53.746 xcodebuild[2394:8186] Error
Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit,
operation never finished bootstrapping - no restart will be attempted"
UserInfo={NSLocalizedDescription=Early unexpected exit, operation never
finished bootstrapping - no restart will be attempted,
NSUnderlyingError=0x7f86389df930 {Error
Domain=IDETestOperationsObserverErrorDomain Code=5 "Test runner exited before
starting test execution." UserInfo={NSLocalizedDescription=Test runner exited
before starting test execution., NSLocalizedRecoverySuggestion=If you believe
this error represents a bug, please attach the result bundle at
/Users/travis/Library/Developer/Xcode/DerivedData/aaaa-
bdscsxnorhzvygafnsqdiqoriugx/Logs/Test/Run-aaaa-2018.12.20_05-57-22-
+0000.xcresult}}}
Testing failed:
aaaa.app (2488) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. Underlying error: Test runner exited before starting test execution.)
** TEST FAILED **
The command "set -o pipefail && xcodebuild -workspace aaaa.xcworkspace -scheme aaaa -destination platform\=iOS\ Simulator,OS\=9.1,name\=iPhone\ 6 build test | xcpretty" exited with 65.
Done. Your build exited with 1.
---我的代码如下---
language: objective-c
osx_image: xcode10
xcode_workspace: aaaa.xcworkspace
xcode_scheme: aaaa
xcode_destination: platform=iOS Simulator,OS=9.1,name=iPhone 6
before_install:
- pod repo update
- npm install ios-sim -g
- ios-sim start --devicetypeid "com.apple.CoreSimulator.SimDeviceType.iPhone-6, 9.1"
解决方案
该问题可以通过以下步骤解决:
更改文件中的版本osx_image
并重.travis.yml
试
// if xcode10.1 build failed, you can change to other version, like xcode9.4
osx_image: xcode10.1
Travis 支持 xcode 版本列表: https ://docs.travis-ci.com/user/languages/objective-c/
推荐阅读
- javascript - 通过 id 将数组放在特定对象上
- microsoft-graph-api - Microsoft Graph API 是否需要 Microsoft 365 订阅才能与微软待办一起使用?
- javascript - 模块解析失败:意外字符 '�' (1:2) src/node_modules/playwright/bin/PrintDeps.exe
- javascript - 如何获得 aria-labelledby 值
- python - 为什么 Tensorflow 不适用于已安装的 CUDA 和 CUDNN?
- javascript - 如何创建具有滚动功能的图像幻灯片?
- angular - 单击mat-panel-description时如何制作不要展开面板
- amazon-web-services - AWS Cognito:在 Auth.signIn 中出现错误(验证 amazon-cognito-identity-js 是否已链接)
- android - 错误 de firebase 无效的文档参考
- openmdao - InterpND for one dimension