具有Xcode工作区的Team City CI-方案“我的方案"未配置运行 [英] Team City CI with Xcode workspace - Scheme "My Scheme" is not configured for running

查看:36
本文介绍了具有Xcode工作区的Team City CI-方案“我的方案"未配置运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个工作空间,其中有几个必须作为静态库构建的项目,并且我有针对它们的测试方案.我想配置TeamCity来构建和测试这些库中的每一个,但是它不能解决以下错误:

I have a workspace with few projects that must be built as static libraries and I have schemes with tests for them. I want to configure TeamCity to build and test each of those libraries, but it does not work with following error:

...
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace code/MyApplication/My Framework.xcworkspace -scheme One Of Tests TEST_AFTER_BUILD=YES clean build -configuration Debug -sdk iphonesimulator6.1
in directory: /Users/Me/TeamCity/buildAgent/work/d0f083d874fc6891
Build settings from command line:
    SDKROOT = iphonesimulator6.1
    TEST_AFTER_BUILD = YES
xcodebuild: error: Failed to build workspace My Framework with scheme One Of Tests.
    Reason: Scheme "One Of Tests" is not configured for running.
Process exited with code 70
...

但是与此同时,当我克隆我的存储库时,将其放入cd并在终端上从上方运行命令:

But at the same moment, when I clone my repository, cd into it and run command from above in terminal:

/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -workspace code/MyApplication/My Framework.xcworkspace -scheme One Of Tests TEST_AFTER_BUILD=YES clean build -configuration Debug -sdk iphonesimulator6.1

成功://更新:它仅适用于构建方案,不适用于测试

It succeeds: // UPDATE: It worked only for build schemes, not for tests

** BUILD SUCCEEDED **  

因此,TeamCity中的设置肯定是错误的.我该怎么做才能使它起作用?

So it's definitely wrong settings in TeamCity. What can I try to make it works?

P.S.建立图书馆的计划效果很好.仅在测试时抛出错误.

P.S. Schemes for building libraries work fine. Only with tests throw errors.

推荐答案

我找到了解决方案.问题在于有关xcodebuild命令对SenTestKit的支持不佳.为了使它可行,我必须进入编辑方案"菜单并设置运行"步骤,以便测试方案可以运行.

I found solution. The problem was about poor support of SenTestKit with xcodebuild command. To make it works I had to go Edit Scheme menu and set Run step so the test scheme became runnable.

感谢解决方案

Thanks for solution this article. There're few things was actually different, it is a Test After Build setting and macros. In my case it runs test only with YES option and I did not have to write any macros. Mb they fix the issue that was described in the article.

这篇关于具有Xcode工作区的Team City CI-方案“我的方案"未配置运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆