okkez/coveralls-lcov

Several issues

02JanDal opened this issue · 6 comments

Hello,

I'm currently working on getting a project I'm working on to coveralls, after I recently successfully got it to work on travis. I first tried with cpp-coveralls, but I had several problems with that. I now tried with coveralls-lcov, which at least gives me more control over which files to include/exclude (thanks to not running gcov by itself), but I still have a few issues:

  1. https://travis-ci.org/02JanDal/MultiMC5/builds/21872133#L864 I know this is not a coveralls-lcov issue, but it works locally and maybe someone here will be able to help me.
  2. https://travis-ci.org/02JanDal/MultiMC5/builds/21872133#L869 This is the main reason for posting this issue here, any idea why this is happening?

Entire build: https://travis-ci.org/02JanDal/MultiMC5/builds/21872133
.travis.yml: https://github.com/02JanDal/MultiMC5/blob/develop/.travis.yml

Jan

https://travis-ci.org/02JanDal/MultiMC5/builds/21872133#L864 I know this is not a coveralls-lcov issue, but it works locally and maybe someone here will be able to help me.

I'm not sure that you can add -o coverage_common.info option as following

lcov -b $SRC_DIR -d $BIN_DIR -c --gcov-tool $GCOV -o coverage_common.info

Please see lcov(1).

https://travis-ci.org/02JanDal/MultiMC5/builds/21872133#L869 This is the main reason for posting this issue here, any idea why this is happening?

First, we don't want to support Ruby1.8, use Ruby 1.9 or later please.
(I will add version check to gemspec later.)
You can check your system's gem command and coveralls-lcov command as followings.
Command result may be different with Travis environment.

$ ruby -v
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
$ ls -l `which gem`
lrwxrwxrwx 1 root root 8  2月 12 21:43 /usr/bin/gem -> gem1.9.1

If you don't use Ruby1.9 or later you can customize Ruby version on Travis using rvm option or update-alternatives command.
Make sure to use Ruby1.9 or later.

See also travis document and update-alternatives(8).

The result of the capture operation will be written to stdout or the tracefile specified with -o.
How would one other wise do it? I wonder if "reached unexpected end of file" is a misleading message meaning the file doesn't exist? I'm pushing a test with `find -name ".gc" to see if all those files are where they belong.

I added the ruby1.9.3 package to be installed, so now I have ruby 1.9.3 (https://travis-ci.org/02JanDal/MultiMC5/builds/21916674#L239), it's still giving the same error though.

EDIT: I think I might have found the reason for the first issue, it seems some files aren't generating the .gcno files. I will check more into that later today.

Thank you for your work.

Maybe, your gem command is for Ruby1.8.
https://travis-ci.org/02JanDal/MultiMC5/builds/21916674#L230
Please try using gem install coveralls-lcov instead of sudo gem install coveralls-lcov.

It may fix the second issue.

It says that

No such file or directory - coverage_common_stripped.info (Errno::ENOENT)

This is expected result and fixed second issue!

Some errors occured in lcov phase such as
https://travis-ci.org/02JanDal/MultiMC5/builds/21946589#L1177
https://travis-ci.org/02JanDal/MultiMC5/builds/21946589#L1180

I think that lcov could not generate coverage_common.info at the first time.
https://travis-ci.org/02JanDal/MultiMC5/builds/21946589#L1171

Please check lcov's status code using echo $?.

Ups, seems I didn't really read the new error. I'm still not sure what the reason for lcov failing is, as the command works locally, but I will hopefully find out soon.