iOS 测试 infer 运行 ios 项目报错(已解决)

彤彤彤彤彤 · 2021年07月29日 · 最后由 陈恒捷 回复于 2021年08月24日 · 3284 次阅读

已解决
1、先编译数据 database
xcodebuild -workspace xx.xcworkspace -scheme XX -sdk iphoneos14.5 | tee xcodebuild.log | xcpretty -r json-compilation-database -o compile_commands.json
2、再执行 infer 指令
infer run --keep-going --skip-analysis-in-path Pods --compilation-database-escaped compile_commands.json

=====================================
安装了 infer 工具后,
跑了官网 java 和 objectc 的 helloword 小示例 都可以运行,但是跑 ios 项目的时候就报错了

如下是报错信息

External Error: *** capture failed to execute: exited with code 64
Error backtrace:
Raised at Stdlib.input_line.scan in file "stdlib.ml", line 449, characters 14-31
Called from Stdio__In_channel.input_line_exn in file "src/in_channel.ml" (inlined), line 68, characters 13-30
Called from IBase__Utils.with_channel_in in file "src/base/Utils.ml", line 260, characters 11-44
Re-raised at IBase__Die.raise_error.do_raise in file "src/base/Die.ml", line 26, characters 8-56
Called from Integration__Driver.capture in file "src/integration/Driver.ml", line 145, characters 6-36
Called from IBase__Utils.timeit in file "src/base/Utils.ml", line 429, characters 16-20
Called from IBase__ScubaLogging.execute_with_time_logging in file "src/base/ScubaLogging.ml", line 79, characters 29-44
Called from Backend__GCStats.log_f in file "src/backend/GCStats.ml", line 90, characters 10-14
Called from Dune__exe__Infer.run in file "src/infer.ml", line 20, characters 2-36
Called from IBase__Utils.timeit in file "src/base/Utils.ml", line 429, characters 16-20
Called from IBase__ScubaLogging.execute_with_time_logging in file "src/base/ScubaLogging.ml", line 79, characters 29-44
Called from Dune__exe__Infer.run in file "src/infer.ml", line 25, characters 22-94
如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 7 条回复 时间 点赞

https://github.com/facebook/infer/issues/1380

有类似的错误

不过信息太少了

感觉是不是有依赖没有安装

3楼 已删除
恒温 回复

确实啊,感觉和我的报错一样 不过不知道怎么解决。。

已解决

是否可以把解决方案也在正文末尾附上,便于后人快速解决?

陈恒捷 回复

贴在上面了

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册