Last active
June 22, 2022 12:47
-
-
Save xseignard/5420661 to your computer and use it in GitHub Desktop.
Merge lcov files
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
#!/bin/bash | |
while read FILENAME; do | |
LCOV_INPUT_FILES="$LCOV_INPUT_FILES -a \"$FILENAME\"" | |
done < <( find $1 -name lcov.info ) | |
eval lcov "${LCOV_INPUT_FILES}" -o $1/$2 |
I cp one of the files to other folder and then start doing cat filexx.lcov >> copiedfile.lcov and it worked fine. the copiedfile.lcov contains all the data, is there any reason you do it in that way? Thanks
Even easier: find project -name lcov.info -exec echo -a {} \; | xargs lcov -o coverage/lcov.info
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install lcov before!
Use it like this:
merge_lcov path/to/coverage/reports outputfile.lcov
It will generate a merged lcov report from all discovered
lcov.info
files in thepath/to/coverage/reports
folder