Comments (10)
This info may help you... from reading the src, it seems that the excludes are applied at two very different places:
- they're used to exclude *.gcov files processed for aggregating the coverage data; and
- they're used to exclude source files (depends on the extension options) from the list of files to send to coveralls.io
So, for example, in my case, if I were to do -e test
to exclude the test source from the output (step 2 above), then, because my build system also generates the *.gcno (and thus *.gcov) files in the test
directory, they're excluded also (step 1 above), resulting in zero coverage for all files.
Ultimately, we should probably be able to specify those exclude types separately, but in the meantime, something like this works for me: -E '.*/test/*.cpp'
Hope that helps.
from cpp-coveralls.
I really do believe that I need a comprehensive cases to test the combinations of different exclude patterns..
from cpp-coveralls.
@pcolby I can't see which of the excludes could've excluded everything
@eddyxu Probably hard to find a good set of excludes.
Is there some way to setup my local computer for testing the output? I tried setting TRAVIS_BRANCH to develop and TRAVIS_JOB_ID to the job id of the latest travis job, but it gave me a "Build processing error".
from cpp-coveralls.
@02JanDal I just released a new version. It supports using --dryrun
to avoid actually uploading report to coveralls.io.
You should be able to run coveralls --verbose --dryrun
to check output.
from cpp-coveralls.
Nice, this doesn't really tell me a lot though: http://paste.ubuntu.com/7213994/
from cpp-coveralls.
@02JanDal in my case, excluding "test" meant that gcov was not executed on the test application's *.gcno file and/or the generated *.gcna file was skipped. These are the files that record all of the code hits that occurred during the execution of the unit test binary itself, so excluding it meant that no code coverage was counted at all - ie all source code counts were NULL in the generated json.
I hope that made sense.
Cheers.
from cpp-coveralls.
@pcolby I've looked through the exclude options back and forth several times, and I can't see any of them doing something like that. I'll try to remove each of them individually to hopefully find out which one is making problems.
from cpp-coveralls.
@02JanDal yeah, may not be an issue for your repo / test layout. Good luck hunting either way 😄
from cpp-coveralls.
@pcolby Thank you anyway.
@eddyxu Found something interesting: https://travis-ci.org/02JanDal/MultiMC5/builds/22449439#L841
Also, --root and --build-root, how should they be used?
EDIT: https://travis-ci.org/02JanDal/MultiMC5/builds/22467859#L445
from cpp-coveralls.
In the project above:
After adding second directory -e 'src/special_behaviour/'
our code coverage has increased significantly, but only because the first -e 'src/test'
start to be ignored.
Is it really not possible to add several directories as excluded? Or maybe we are doing something wrong.
from cpp-coveralls.
Related Issues (20)
- ValueError: invalid literal for int() with base 10: '917*' HOT 3
- Where is args.lcov_file being set?
- unable to generate report
- pip install failure on ubuntu/trusty64 HOT 5
- Best method for implementing with Boost Unit Test Cases
- Cannot find files due to odd path creation HOT 1
- 0 of 0 relevant lines covered: am I not using correct arguments? HOT 2
- Exclusion regexps do not appear to work HOT 2
- Variable interpolation into shell commands is unsafe HOT 1
- Is this project dead? HOT 1
- circleci not supported HOT 1
- --include or --exclude options doesn't seem to work at all HOT 3
- FIleNotFoundError with invalid path HOT 1
- YAMLLoadWarning HOT 1
- Cannot open source file
- Failed to see coverage results on Coveralls HOT 1
- Deprecation warning due to invalid escape sequences
- FileNotFoundError for not existing file
- github actions not showing the correct files on coveralls website
- feature request: carryforward flags
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 cpp-coveralls.