hackndev / zinc

The bare metal stack for rust
zinc.rs
Apache License 2.0
1k stars 100 forks source link

Added kcov coverage for travis/coveralls #304

Closed farcaller closed 9 years ago

coveralls commented 9 years ago

Coverage Status

Changes Unknown when pulling 5cced45a889daf87fd912ab49cad9a786057401c on farcaller:kcov into \ on hackndev:master**.

mcoffin commented 9 years ago

It would be nice to have the badge added to the README along with this.

farcaller commented 9 years ago

It's currently broken, as it needs kcov binary from HEAD and the paths are src/ relative anyway.

farcaller commented 9 years ago

Okay, I have no idea how to make coveralls work properly, OTOH jenkins parses the kcov report quite fine

posborne commented 9 years ago

Something following might work (haven't tested on travis), if we really want kcov upstream now:

sudo apt-get build-dep kcov
wget https://github.com/SimonKagstrom/kcov/archive/v27.tar.gz
tar xzvf v27.tar.gz
mkdir kcov-27/build
cd kcov-27/build
cmake ..
make
sudo make install
farcaller commented 9 years ago

kcov has a bunch of weird deps and still doesn't work with coveralls so far as json format changed.

posborne commented 9 years ago

kcov has a bunch of weird deps and still doesn't work with coveralls so far as json format changed.

Gotcha. The above worked for me on a 14.04 machine (travis is 12.04 I think) but who knows if I installed something earlier. None of that matters if coveralls still won't understand the output.

farcaller commented 9 years ago

Works for at least jenkins now.

SimonKagstrom commented 9 years ago

@posborne A fair amount of rust projects clone kcov to run the coveralls tests, basically with the method you propose. See for example:

https://github.com/maidsafe/maidsafe_client/blob/master/.travis.yml

I think apt-get build-deps kcov can cause problems since the kcov in Ubuntu 12.04 (and I think 14.04) is quite old and is likely missing some dependencies.