使用Jenkins运行ios-sim [英] Running ios-sim with Jenkins

查看:136
本文介绍了使用Jenkins运行ios-sim的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 ios-sim ,但这就是我得到的:

I'm trying to start my app from the command line using ios-sim but this is what I get:

Started by user User
Building in workspace /Users/Shared/Jenkins/Home/jobs/UI Testing/workspace
[workspace] $ /bin/sh -xe /var/folders/h4/ws64t3bx2nnds4pg3345xrr000009c/T/hudson6341279754557259451.sh
+ /Users/myUser/Desktop/ios-sim launch /Users/Shared/Jenkins/Home/jobs/Project_Monkey_Build/workspace/build/Debug-iphonesimulator/ProjectMonkey.app

    [DEBUG] Could not start simulator session: Error Domain=DTiPhoneSimulatorErrorDomain Code=5
 "Operation failed with underlying error 4294956486." UserInfo=0x1001b1760 
{NSLocalizedDescription=Operation failed with underlying error 4294956486., 
NSUnderlyingError=0x1001a3390 "The operation couldn’t be completed. (OSStatus error -10810.)"}

这似乎是一个权限问题,因为我可以从终端运行相同的命令,并且工作正常.我还尝试将777权限授予ios-sim和MonkeyTalk目录,但仍然没有.

It looks like a permission problem as I can run the same command from terminal and it works fine. I've also tried to give full 777 permission to ios-sim and the MonkeyTalk directory,but still nothing.

有什么主意吗?

推荐答案

这可能与Jenkins进程没有显示"有关.尝试以登录到桌面的用户身份运行Jenkins,然后再次运行ios-sim.

It might be related to the Jenkins process not having a "display". Try running Jenkins as a user logged in to the desktop, then run the ios-sim again.

从启动中卸载Jenkins:

Unload Jenkins from launchd:

sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

然后从终端运行Jenkins:

Then run Jenkins from a terminal:

sudo su jenkins -c "JENKINS_HOME=/Users/Shared/Jenkins/Home /Library/Application\ Support/Jenkins/jenkins-runner.sh"

如果这行得通,您可以通过将启动的作业配置文件从/Library/LaunchDaemons/org.jenkins-ci.plist移到~/Library/LaunchAgents/org.jenkins-ci.plist

If this works, you can make Jenkins always run as a logged in user by moving the launchd job config file from /Library/LaunchDaemons/org.jenkins-ci.plist to ~/Library/LaunchAgents/org.jenkins-ci.plist

这篇关于使用Jenkins运行ios-sim的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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