gpt4 book ai didi

instruments - 自动化仪器拒绝命令后如何重置仪器

转载 作者:行者123 更新时间:2023-12-03 01:24:24 25 4
gpt4 key购买 nike

(Xcode 4.5)

当从命令行运行仪器时,它第一次可以工作,但直到我重新启动后它才会再次运行。

仪器的详细输出包括:

Instruments : Loading template 'file://localhost/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate'
Instruments : Setting Instrument Trace Command : Instrument Command (purpose:Idle; output destination:file://localhost/Users/xxxxx/instrumentscli0.trace)
Instruments : Trace Command Recognized
Instruments : Instrument 'Automation - MyProject' rejected command 'Instrument Command (purpose:Trace; output destination:file://localhost/Users/xxxxx/instrumentscli0.trace)' for target 'Executable (name:MyProject; arguments:)'
Instruments : Instruments Rejected Command
Instruments Trace Error : Failed to start trace.

我用来运行仪器的命令行是这样的(为了清楚起见,分成多行):

instruments -v -w <DeviceID>
-t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate
/Users/xxxxx/dev/MyProject/build/Debug-iphoneos/MyProject.app
-e UIASCRIPT /Users/xxxxx/dev/MyProject/UIAutoTests/some_test.js

我尝试比较使用 ps 第一次(成功)运行之前和之后运行的进程以及使用 lsof 之前和之后打开的文件/管道,但我找不到任何东西来说明为什么它不会运行多次。

该错误似乎表明仪器中的自动化仪器拒绝 目的:Trace 命令,因此我尝试删除输出跟踪目录(以防自动递增的文件名导致问题),我尝试在运行之间使用不同的模板运行仪器,看看这是否清除了阻止它的任何内容,但每次重新启动时我无法让它工作多次。

我怀疑自动化仪器或仪器使用的共享库中存在某些无效状态。我需要一种从命令行重置此状态的方法,以便我可以在 CI 服务器上可靠地运行自动化测试。

有没有办法比较之前/之后加载和卸载的共享库?对于可能持续存在的内容以及如何重置它,有人有任何其他想法吗?

最佳答案

尝试下载 Xcode 4.4.1(iOS 开发中心)并使用其 Instruments 4.4 (4445)。此版本适用于我的所有设备。

仅供引用,当我使用4.5+,甚至4.6DP4时,只有iOS6设备可以正常响应;其他人会失败并显示与您相同的消息。尝试一下,如果 4.4 效果不好,甚至可以使用 4.3.3。

关于instruments - 自动化仪器拒绝命令后如何重置仪器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12587243/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com