diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-06-15 09:28:31 -0700 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-06-15 20:58:26 -0700 |
commit | 927d321d90a971caae629210e53858f6057903e4 (patch) | |
tree | 2dcd0a27d290a740a41923d3c2a4d040d0a430a1 | |
parent | b3b44841f02ea800f7f237f87c33081bb7032b09 (diff) |
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
-rw-r--r-- | .travis.yml | 4 |
1 files changed, 3 insertions, 1 deletions
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 |