Skip to content
Snippets Groups Projects
Commit 927d321d authored by Arseny Kapoulkine's avatar Arseny Kapoulkine
Browse files

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
parent b3b44841
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment