Exclude unreachable lines from code coverage

codecov.io does not seem to support lcov regex customization;
additionally, we can't just replace unreachable with LCOV_LINE_EXCL
in gcov file - so we have to patch the ##### indicator (which suggests
the line hasn't been hit) with 1.

See also https://github.com/codecov/support/issues/144
This commit is contained in:
Arseny Kapoulkine 2017-06-15 09:28:31 -07:00
parent b3b44841f0
commit 927d321d90

View file

@ -14,4 +14,6 @@ script:
- make test cxxstd=c++11 defines=$DEFINES config=release -j2
- make test cxxstd=c++98 defines=$DEFINES config=debug -j2
after_success: bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov
after_success:
- sed -e "s/#####\(.*\)\(\/\/ unreachable.*\)/ 1\1\2/" -i pugixml.cpp.gcov
- bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov