forked from epfl-ecps/channelflow
-
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 coverage reports to channelflow (epfl-ecps#8)
* Added coverage computation to unit and integration tests The code is compiled passing '--coverage -g' during the 'Unit and integration tests' stage. Once tests are run data is processed using lcov and printed to stdout, if tests succeeded. * Tests done for coverage are built in debug mode with -Og * Added summary badges to the README file. - Build status - Total coverage - License
- Loading branch information
Showing
5 changed files
with
41 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
coverage: | ||
ignore: | ||
- tests/ | ||
- bundled/ |
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,17 @@ | ||
#!/bin/bash -e | ||
|
||
if [[ "${OMPI_CC}" == "gcc" ]] | ||
then | ||
# Go to the build directory and compute coverage | ||
cd ${TRAVIS_BUILD_DIR}/cmake-build-release | ||
lcov --version | ||
echo $PWD | ||
lcov --rc lcov_branch_coverage=1 --directory . --capture --output-file coverage.info | ||
lcov --rc lcov_branch_coverage=1 --remove coverage.info '/*tests/*' --output-file coverage.info | ||
lcov --rc lcov_branch_coverage=1 --remove coverage.info '/*/bundled/*' --output-file coverage.info | ||
lcov --rc lcov_branch_coverage=1 --remove coverage.info '/usr/*' --output-file coverage.info | ||
lcov --rc lcov_branch_coverage=1 --list coverage.info | ||
|
||
# Upload to codecov website | ||
bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports" | ||
fi |
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