Comments (28)
you can check code here.
https://github.com/vigcoin/coin
the error info can be found here:
https://circleci.com/gh/vigcoin/coin/43
from lcov.
You need to add a pattern for the "tests" directory to the lcov --remove
call.
from lcov.
You're using this command line:
lcov --remove temp.info "/usr/include/*" "./include/*" "./tests/*"
Note that lcov does not expand the "." in this command line to mean the current working directory. I would assume that the paths in the coverage data file are in absolute form, so that the relative "." will not match anything (since there's no absolute directory named ".").
Try specifying the path in absolute form. Something like the following should remove all occurrences of tests
and include
sub-directories (which may be more than you intended).
lcov --remove temp.info "/usr/include/*" "*/include/*" "*/tests/*"
from lcov.
Hi @calidion ,
you can remove that files using lcov --remove coverage.info excludes_pattern
from lcov.
@myrgy
it seems not working.
I use
lcov --remove coverage.info '/usr/include/*' './include/*'
but /usr/include
still in the generated html.
from lcov.
>>lcov --remove coverage.info '/usr/include/*' './include/*' --output-file coverage2.info
>>genhtml coverage2.info
Im my case I'm creating a new filtered file. But according to lcov manual it should work with original file as well. I would recommend you play with generated DB using command line.
-r tracefile pattern
--remove tracefile pattern
Remove data from tracefile.
Use this switch if you want to remove coverage data for a par‐
ticular set of files from a tracefile. Additional command line
parameters will be interpreted as shell wildcard patterns (note
that they may need to be escaped accordingly to prevent the
shell from expanding them first). Every file entry in tracefile
which matches at least one of those patterns will be removed.
The result of the remove operation will be written to stdout or
the tracefile specified with -o.
Only one of -z, -c, -a, -e, -r, -l, --diff or --summary may be
specified at a time.
It should work since I have exactly the same set up in my projects.
from lcov.
not working.
cmd:
lcov --remove temp.info '/usr/include/*' './include/*' --output-file coverage.info
result:
Writing data to coverage.info
lcov: ERROR: cannot write to coverage.info!
from lcov.
from lcov.
thanks.
I solved by double quotes and redirection.
lcov --remove temp.info "/usr/include/*" "./include/*" > coverage.info
from lcov.
you may use --output-file
instead of redirection.
from lcov.
--output-file
seems not working.
from lcov.
confirmed.
> lcov --remove temp.info "/usr/include/*" "./include/*" --output-file coverage.info
Deleted 289 files
Writing data to coverage.info
lcov: ERROR: cannot write to coverage.info!
from lcov.
Just in case - does this file exist? In my script I remove all files after coverage generation.
from lcov.
I have tested this case. Have no relevance.
from lcov.
Unfortunately I have no idea why it doesn't work for you.
Try to study lcov manual pages.
Seems like you call is correct:
lcov -r|--remove tracefile pattern
[-o|--output-file tracefile] [--checksum] [--no-checksum]
[-q|--quiet] [--config-file config-file] [--rc keyword=value]
so issue might be related to wrong working dir and some restriction issues.
Looks like --output-file works fine for @totoc1001. So I assume that you have some local issue.
from lcov.
I don't know why.
the output temp.info is ok.
from lcov.
I checked my script - we are using --quiet
flag. and in general that's all difference.
COMMAND ${LCOV_PATH} --quiet --remove ${Coverage_NAME}.info ${Coverage_EXCLUDES} --output-file ${Coverage_NAME}.info.cleaned
from lcov.
from lcov.
it's sequenced with other lcov command as a cmake custom target. As a result if lcov fails - I'll notice that, otherwise it should work.
from lcov.
from lcov.
Thank you @totoc1001. I'll take a look or at least will disable --quiet.
from lcov.
from lcov.
try
./build-debug.sh
from lcov.
https://codecov.io/gh/vigcoin/coin
totally confused:
tests
folder is still included
from lcov.
@oberpar still not working.
from lcov.
@oberpar
Thank you very much.
That's what exactly i want
from lcov.
It works on mac os too:)
from lcov.
from lcov.
Related Issues (20)
- genhtml: --keep-going doesn't work for ERROR: <file> is not readable or doesn't exist. HOT 8
- how to see the verbose error msg? HOT 11
- LCOV 2.1 not compatible with Codecov HOT 9
- LCOV coverage.dat file has "DA:0:0" HOT 3
- lcov on x86 HOT 9
- genhtml: ERROR: Can't call method "branchElem" on an undefined value HOT 2
- Duplicate folder structure (--prefix does not help) HOT 2
- gcov error:std::bad_alloc HOT 8
- lcov fails with gcc 14 HOT 1
- perl2lcov: unexpected data type 'time' HOT 6
- genhtml package removed from PyPI HOT 1
- RPM 2.1-1 does not install on Rocky Linux 8 or Centos7 HOT 1
- Unable to generate gcda file for cc_library_shared module HOT 4
- inconsistent branch coverage summary HOT 1
- Build of example fails on Ubuntu 22.04.4 LTS due to Makefile using SHELL of /bin/sh (softlink to /bin/dash) HOT 1
- Build of examples fails if part of path is a softlink HOT 4
- Option geninfo_external from a user-provided lcovrc file gets ignored HOT 4
- Incorrect #line directives cause Perl warnings HOT 1
- lcov fails with "(inconsistent) mismatched end line" for googletest code HOT 1
- lcov --no-external behaves incorrectly with 2 or more -d
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lcov.