forked from trustwallet/wallet-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add code coverage reporting (trustwallet#267)
- Loading branch information
1 parent
2542c5c
commit 98b31b8
Showing
7 changed files
with
73 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,7 @@ lib/protobuf | |
jni/cpp/generated | ||
jni/java | ||
swift/Sources/Generated | ||
|
||
# Code coverage files | ||
coverage.info | ||
coverage/ |
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
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
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,23 @@ | ||
#!/bin/bash | ||
# | ||
# This script captures test code coverage information. | ||
|
||
set -e | ||
|
||
lcov --capture --directory . --output-file coverage.info | ||
lcov --remove coverage.info '/usr/*' --output-file coverage.info | ||
lcov --remove coverage.info '/Applications/*' --output-file coverage.info | ||
lcov --remove coverage.info '*/build/*' --output-file coverage.info | ||
lcov --remove coverage.info '*.pb.cc' --output-file coverage.info | ||
lcov --remove coverage.info '*.pb.h' --output-file coverage.info | ||
lcov --remove coverage.info '*/tests/*' --output-file coverage.info | ||
bash <(curl -s https://codecov.io/bash) -f coverage.info -t 1faef852-b196-4697-885b-0ff22a625181 || echo "Codecov did not collect coverage reports" | ||
|
||
# Generate HTML report | ||
if [[ "$1" == "html" ]]; then | ||
genhtml --output-directory coverage \ | ||
--demangle-cpp --num-spaces 4 --sort \ | ||
--title "Trust Wallet Core Test Coverage" \ | ||
--function-coverage --branch-coverage --legend \ | ||
coverage.info | ||
fi |