Skip to content
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

Trouble handling generated code #115

Open
nicowilliams opened this issue May 31, 2017 · 1 comment
Open

Trouble handling generated code #115

nicowilliams opened this issue May 31, 2017 · 1 comment

Comments

@nicowilliams
Copy link

nicowilliams commented May 31, 2017

I'm trying to add coveralls CI with Travis to Heimdal (see also my fork).

cpp-coveralls ends up using the wrong path to generated code files. Eventually I concluded that out-of-source builds are not well supported and modified the .travis.yml (in my fork) accordingly, but still, there's always some file cpp-coveralls cannot find, as you can see in the logs (scroll to the bottom):

Traceback (most recent call last):
  File "/home/travis/.local/bin/coveralls", line 11, in <module>
    load_entry_point('cpp-coveralls==0.3.12', 'console_scripts', 'coveralls')()
  File "/home/travis/.local/lib/python2.7/site-packages/cpp_coveralls/__init__.py", line 96, in run
    cov_report = coverage.collect(args)
  File "/home/travis/.local/lib/python2.7/site-packages/cpp_coveralls/coverage.py", line 447, in collect
    with io.open(source_file_path, mode='rb') as src_file:
IOError: [Errno 2] No such file or directory: '/home/travis/build/nicowilliams/heimdal/intr.c'

EDIT: intr.c is not generated, it is normally actually tests/bin/intr.c. I don't know why or how the dirname of that got lost.

I'm running cpp-coveralls like this:

      coveralls --gcov-options '\-lp'       \
                -x c                        \
                -r `dirname "$PWD"`         \
                -b "$PWD"

I've tried a variety of... variations. I've tried using -e with various forms of the troublesome filenames.

@nicowilliams
Copy link
Author

If I use in-tree builds and drop the -r and -b and -x options I still get this:

Traceback (most recent call last):
  File "/home/travis/.local/bin/coveralls", line 11, in <module>
    load_entry_point('cpp-coveralls==0.3.12', 'console_scripts', 'coveralls')()
  File "/home/travis/.local/lib/python2.7/site-packages/cpp_coveralls/__init__.py", line 96, in run
    cov_report = coverage.collect(args)
  File "/home/travis/.local/lib/python2.7/site-packages/cpp_coveralls/coverage.py", line 447, in collect
    with io.open(source_file_path, mode='rb') as src_file:
IOError: [Errno 2] No such file or directory: '/home/travis/build/nicowilliams/heimdal/libtommath/bn_mp_reduce_2k_l.c'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant