dde-dock/gen_report.sh
liuxing 2b4f2ba456 feat: 任务栏gtest单元测试框架添加
任务栏gtest单元测试框架添加

Log: 任务栏gtest单元测试框架添加
Task: https://pms.uniontech.com/zentao/task-view-44498.html
Change-Id: Ifaf67e4d019c21bd00af6645deeb57a81b343afb
2020-11-25 16:58:51 +08:00

18 lines
636 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 需要先安装lcov打开./unittest/CMakeLists.txt 测试覆盖率的编译条件
# 将该脚本放置到dde-dock-unit_test二进制文件同级目录运行
lcov -c -i -d ./ -o init.info
./dde_dock_unit_test
lcov -c -d ./ -o cover.info
lcov -a init.info -a cover.info -o total.info
lcov --remove total.info '*/usr/include/*' '*/usr/lib/*' '*/usr/lib64/*' '*/usr/local/include/*' '*/usr/local/lib/*' '*/usr/local/lib64/*' '*/third/*' 'testa.cpp' -o final.info
# 生成报告
genhtml -o cover_report --legend --title "lcov" --prefix=./ final.info
#打开报告
nohup x-www-browser ./cover_report/index.html &
exit 0