From 927d321d90a971caae629210e53858f6057903e4 Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Thu, 15 Jun 2017 09:28:31 -0700 Subject: 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 --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to '.travis.yml') diff --git a/.travis.yml b/.travis.yml index df5569c..f35124d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 -- cgit v1.2.3