forked from commaai/openpilot
-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
collect C++ code coverage (commaai#23619)
* collect cpp coverage * install llvm * compile with coverage * cd to root * remove broken gcda files * remove newline * delete more stuff * script to collect coverage * Update tools/collect_coverage.sh * actually delete
- Loading branch information
Showing
6 changed files
with
46 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,3 +83,7 @@ models/*.thneed | |
build/ | ||
|
||
!**/.gitkeep | ||
|
||
*.gcno | ||
*.gcda | ||
coverage.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
find opendbc/can/dbc_out -name "*.gcda" -delete | ||
find rednose/helpers -name "*.gcda" -delete | ||
find rednose_repo/rednose/helpers -name "*.gcda" -delete | ||
find cereal/gen -name "*.gcda" -delete | ||
|
||
lcov --capture --directory . --gcov-tool tools/gcov_for_clang.sh --output-file coverage.info | ||
lcov --remove coverage.info '*/third_party/*' --output-file coverage.info | ||
lcov --remove coverage.info '/usr/*' --output-file coverage.info | ||
|
||
coverage xml || true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
exec llvm-cov gcov "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters