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

FileNotFoundError for not existing file #156

Open
marxin opened this issue Jul 23, 2020 · 0 comments
Open

FileNotFoundError for not existing file #156

marxin opened this issue Jul 23, 2020 · 0 comments

Comments

@marxin
Copy link

marxin commented Jul 23, 2020

Sometimes gcov creates .gcov files that don't have a source file (a typical example is a .l lexer file):

gcov a-test.c
File 'foooo.c'
Lines executed:100.00% of 2
Creating 'foooo.c.gcov'
Cannot open source file foooo.c

Lines executed:100.00% of 2

where foooo.c.gcov contains:

cat foooo.c.gcov
        -:    0:Source:foooo.c
        -:    0:Graph:a-test.gcno
        -:    0:Data:a-test.gcda
        -:    0:Runs:1

and coverall crashes:

coveralls 
Traceback (most recent call last):
  File "/home/marxin/.local/bin/coveralls", line 8, in <module>
    sys.exit(run())
  File "/home/marxin/.local/lib/python3.8/site-packages/cpp_coveralls/__init__.py", line 97, in run
    cov_report = coverage.collect(args)
  File "/home/marxin/.local/lib/python3.8/site-packages/cpp_coveralls/coverage.py", line 455, in collect
    with io.open(source_file_path, mode='rb') as src_file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/marxin/Programming/testcases/sample/foooo.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