-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
--include or --exclude options doesn't seem to work at all #145
Comments
I'm having the same issue, --exclude-pattern is not excluding any of the directories I specify. |
I've spent a while playing with it, and got it to work for my needs. For anyone who's struggling like I did:
For my project, I have unit tests (using GTest), an example program, and benchmarking. To prevent cpp-coveralls from getting coverage of my example program and only get coverage using my unit tests, I had to be specific in my --exclude. Below is what I used in my .travis.yml to get coverage working for my project: coveralls -r .. -i "src/" -i "test/" --exclude "utils" --exclude "benchmark" --exclude "example" --exclude "build/CMakeFiles/memory_allocator.dir/" --gcov-options '-lp' --verbose If you want to reference anything from my project, you can find it here https://github.com/adam-stamand/memory-allocators. Hope this helps somebody. |
cpp-coveralls -e exclude rules prevent gcov from being executed, which is not what we need, e.g. eddyxu/cpp-coveralls#145 (comment) we want to exclude from the coverage reports - autogenerated Qt/CMake code - test code - code from third-party/ This can be done as exclusion (python) regular expressions.
Which of "--exclude", "--exclude-pattern", or "--exclude-lines-pattern" would work in conjunction with the
I have a pre-existing coverage.info file. Uploading it with cpp-coveralls. Trying to exclude files with "--exclude-pattern". The fix seems to be It would be great if @adam-stamand (or someone else) could add a new paragraph in the README that more verbosely clarifies the differences between "--exclude", "--exclude-pattern" and "--exclude-lines-pattern", since the description of all three seems to be "exclude file or directory". |
For example this excludes nothing:
According to the somewhat absent documentation, you would expect:
The text was updated successfully, but these errors were encountered: