mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
Travis: coverage: gcov: process .gnco separately (#2574)
Also uses consistent flags with codecov, i.e. lua53 also with gcov / `#c_code`.
This commit is contained in:
parent
f75dacb504
commit
3804040dbe
1 changed files with 22 additions and 1 deletions
23
.travis.yml
23
.travis.yml
|
@ -125,7 +125,28 @@ install:
|
|||
do_codecov_gcov() {
|
||||
echo "== do_codecov_gcov in $PWD: $*: =="
|
||||
if [ "$DO_COVERAGE" = "codecov" ]; then
|
||||
travis_retry bash /tmp/codecov-bash -X coveragepy -c -F "$1" || return 1
|
||||
# Report coverage for each .gcno file separately.
|
||||
# gcov will create .gcov files for the same source (e.g. for
|
||||
# globalconf.h from awesome.c.gcno and event.c.gcno).
|
||||
i=0
|
||||
set -x
|
||||
(
|
||||
cd build
|
||||
find -path "*/lgi-check.dir" -prune -o \( -name '*.gcno' -print \) | while read -r gcno; do
|
||||
gcov -pb "$gcno"
|
||||
|
||||
mkdir gcov.$(( ++i ))
|
||||
mv *.gcov "gcov.$i"
|
||||
|
||||
# Delete any files for /usr.
|
||||
# They are not relevant and might cause "Invalid path part" errors
|
||||
# with Code Climate.
|
||||
find "gcov.$i" -maxdepth 1 -type f -name '#usr#*.gcov' -delete
|
||||
done
|
||||
|
||||
# Upload to Codecov.
|
||||
travis_retry bash /tmp/codecov-bash -X gcov -X coveragepy -F "$1,${LUANAME//./}"
|
||||
)
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue