2 个版本
| 0.2.1 | 2022 年 12 月 8 日 |
|---|---|
| 0.2.0 | 2021 年 9 月 10 日 |
#2133 在 解析实现
15KB
278 行
Lcov Diff
先决条件
- Rust,安装 rustup,查看
- Cargo
- genhtml(通过
apt安装lcov)
构建
git clone <repo>
cd lcov-diff
cargo build --release
查看 target/release 如果要构建 debug 版本,只需运行:cargo build
运行测试
cargo test --all
安装(到 $HOME/.cargo/bin)
cargo install --path .
查看 cargo 文档
用于比较 lcov 文件的工具
USAGE:
lcov-diff [FLAGS] [OPTIONS] <FILE1> <FILE2>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
-v, --verbose Show Debug logging
OPTIONS:
-o, --output <PATH> output file to write (stdout if not presented)
-w, --web <web> Generate html report from output file (default name web)
ARGS:
<FILE1> <FILE2> Files to process, right now just two of them
输出文件只包含仅在第一个 lcov 文件中出现的行/函数/基本块。要为差异生成 html 报告,请使用 genhtml 工具,查看。
lcov-diff first.info second.info -o out.info
genhtml --ignore-errors source -o web out.info
或者只需使用 -w/--web 选项自动生成它(如果未设置 output,将使用临时文件)。默认输出目录名为 web。此外,如果在调用 genhtml 时出现 panic,则它也会进入 panic。
lcov-diff first.info second.info -w LCOV_HTML_DIR -o out.info
依赖关系
~6–17MB
~207K SLoC