Code Monkey home page Code Monkey logo

Comments (10)

pcolby avatar pcolby commented on July 17, 2024

This info may help you... from reading the src, it seems that the excludes are applied at two very different places:

  1. they're used to exclude *.gcov files processed for aggregating the coverage data; and
  2. 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.

eddyxu avatar eddyxu commented on July 17, 2024

I really do believe that I need a comprehensive cases to test the combinations of different exclude patterns..

from cpp-coveralls.

02JanDal avatar 02JanDal commented on July 17, 2024

@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.

eddyxu avatar eddyxu commented on July 17, 2024

@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.

02JanDal avatar 02JanDal commented on July 17, 2024

Nice, this doesn't really tell me a lot though: http://paste.ubuntu.com/7213994/

from cpp-coveralls.

pcolby avatar pcolby commented on July 17, 2024

@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.

02JanDal avatar 02JanDal commented on July 17, 2024

@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.

pcolby avatar pcolby commented on July 17, 2024

@02JanDal yeah, may not be an issue for your repo / test layout. Good luck hunting either way 😄

from cpp-coveralls.

02JanDal avatar 02JanDal commented on July 17, 2024

@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.

hbdgr avatar hbdgr commented on July 17, 2024

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.

code change

Is it really not possible to add several directories as excluded? Or maybe we are doing something wrong.

from cpp-coveralls.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.