可能重复: 有没有办法从Instruments(XCode)的命令行实例中删除授权提示?
我一直坚持建立一个jenkins工作,以便现在全天自动运行我的UIAutomation脚本。 我一个接一个地解决了所有这些问题(默认情况下jenkins作为守护进程运行,还有更多)我剩下一个。 'instruments'命令会要求获得监听进程或某些内容的权限(我忘记了确切的措辞),因为这需要提示用户/传递它会导致我的脚本失败:
无法授权权限(0x2),状态为:-60007
这是我工作的最后一个障碍,我尝试过:
echo“user \ npassword”| 仪器 ....
但这似乎并没有提供这些提示值。 仍然失败并出现同样的错误。 如何在某处运行乐器或修改某些文件,以免出现这种情况?
谢谢!
Possible Duplicate: Is there a way to remove the authorization prompt from command-line instances of Instruments (XCode)?
I've been stuck building a jenkins job to automatically run my UIAutomation script now ALL day. One by one I've worked through all the issues with doing this (jenkins running as a daemon by default, lots more) and I have one left. The 'instruments' command will ask for permission to listen to a process or something (I forget the exact wording) and since this requires a prompt of the user/pass it kills my script with error:
Failed to authorize rights (0x2) with status: -60007
This is my last hurdle to getting this working and I've tried:
echo "user\npassword" | instruments ....
but this doesn't seem to feed these prompted values in at all. Still fails with the same error. How do I run instruments or modify some file somewhere so it won't prompt for this?
Thankyou!
最满意答案
听起来像我不得不很快潜入的东西。
我很好奇如果你将你的仪器命令添加到/ etc / sudoers然后尝试运行会发生什么。 可能会避免你看到的auth提示。
尝试一下:
“sudo visudo”在一个终端
添加此行(将“yourargs”替换为其余的乐器命令)
yourUserName ALL = NOPASSWD:/ usr / bin / instruments yourargs
然后尝试运行Jenkins代理尝试运行的命令,在其前面添加“sudo”,例如“sudo instruments ......”
Sounds like something I am going to have to dive into soon myself.
I'd be curious what happens if you add your instruments command to /etc/sudoers and then try to run. Might avoid the auth prompt you're seeing.
To give it a try:
"sudo visudo" in a terminal
Add this line (replacing "yourargs" with the rest of your instruments command)
yourUserName ALL=NOPASSWD: /usr/bin/instruments yourargs
Then try running the command the Jenkins agent is trying to run, prefixing it with "sudo", e.g. "sudo instruments ..."
更多推荐
发布评论