On Di, 10 Apr 2018, Bram Moolenaar wrote:

> 
> Christian wrote:
> 
> > On Di, 10 Apr 2018, Bram Moolenaar wrote:
> > 
> > > 
> > > Patch 8.0.1693
> > > Problem:    Xxd is excluded from coverage statistics.
> > > Solution:   Don't skip the xxd directory. (Christian Brabandt)
> > > Files:      .travis.yml
> > 
> > I think this is still not working correctly.
> > 
> > >From https://api.travis-ci.org/v3/job/364771625/log.txt
> > Coverage:
> > File 'xxd.c'
> > Lines executed:58.03% of 355
> > Creating 'xxd.c.gcov'
> > Cannot open source file xxd.c
> > 
> > Codecov:
> > File 'xxd.c'
> > Lines executed:58.03% of 355
> > Branches executed:76.17% of 428
> > Taken at least once:50.23% of 428
> > Calls executed:31.72% of 145
> > Creating 'xxd.c.gcov'
> > Cannot open source file xxd.c
> > 
> > Don't know why this is happening (but e.g. working for libvterm).
> 
> The libvterm files are build from the main src directory, xxd is in
> src/xxd.  Apparently it doesn't know about the xxd subdirectory.

I see. In fact, codecov.io did collect the coverage statistics already:
https://codecov.io/gh/vim/vim/src/master/src/xxd/xxd.c

> Is it possible to specify two build directories?


Kind of, so I think there is a workaround. Currently coveralls fails with this 
error:
https://api.travis-ci.org/v3/job/364785069/log.txt
,----
| Traceback (most recent call last):
|   File "/home/travis/.local/bin/coveralls", line 11, in <module>
|     sys.exit(run())
|   File 
"/home/travis/.local/lib/python2.7/site-packages/cpp_coveralls/__init__.py", 
line 97, 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: './src/xxd.c'
`----

This is what is run currently (whithout the verbose and dry-run parameters):
~/.local/bin/coveralls --verbose --dryrun -b ./src -x .xs -e ./src/if_perl.c  
--encodings utf-8 latin-1 EUC-KR
and this produces:
,----
| [...]
| File 'xxd.c'
| Lines executed:14.57% of 357
| Creating 'xxd.c.gcov'
| Cannot open source file xxd.c
| 
| Traceback (most recent call last):
|   File "/home/chrisbra/.local/bin/coveralls", line 11, in <module>
|     sys.exit(run())
|   File 
"/home/chrisbra/.local/lib/python2.7/site-packages/cpp_coveralls/__init__.py", 
line 97, in run
|     cov_report = coverage.collect(args)
|   File 
"/home/chrisbra/.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: './src/xxd.c'
`----

>From my testing this seems to work adding the `-i ./src/xxd` parameter

using the -i parameter you should be able to get rid of the crash, however it 
still reports it cannot open xxd.c 
 ~/.local/bin/coveralls --verbose --dryrun -b ./src -i ./src/xxd -x .xs -e 
./src/if_perl.c  --encodings utf-8 latin-1 EUC-KR

,----
| File 'xxd.c'
| Lines executed:14.57% of 357
| Creating 'xxd.c.gcov'
| Cannot open source file xxd.c
`----

This might already work, if not, we might need to link src/xxd/xxd.c to 
src/xxd.c Then I got rid of the "Cannot open source file" message.

I also asked for advice on the cpp-coveralls github project, but there doesn't 
seem to be very much activity, so I don't know if I will receive an answer.

Best,
Christian
-- 
Was ist der Unterschied zwischen einem Alkoholiker und Windows 95?
Beide stürzten regelmäßig ab.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui