Skip to content

Commit

Permalink
Move unreachable line handling to Makefile
Browse files Browse the repository at this point in the history
This allows us to reuse this code for MinGW builds.

Additionally disable coverage step for Linux clang - it looks like
Travis has a mismatch in the version of gcov info between clang and gcov
which causes gcov to crash - somehow this crash isn't picked up as a
build error.
  • Loading branch information
zeux committed Dec 10, 2018
1 parent 2da1524 commit ba84465
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@ env:
- DEFINES=PUGIXML_NO_EXCEPTIONS

script:
- make test cxxstd=c++11 defines=$DEFINES config=coverage -j2
- if [[ ! ( "$CXX" == "clang++" && "$TRAVIS_OS_NAME" == "linux" ) ]]; then make test cxxstd=c++11 defines=$DEFINES config=coverage -j2; fi
- if [[ "$CXX" == "clang++" ]]; then make test cxxstd=c++11 defines=$DEFINES config=sanitize -j2; fi
- make test cxxstd=c++11 defines=$DEFINES config=release -j2
- make test cxxstd=c++98 defines=$DEFINES config=debug -j2

after_success:
- sed -e "s/#####\(.*\)\(\/\/ unreachable.*\)/ 1\1\2/" -i pugixml.cpp.gcov
- bash <(curl -s https://codecov.io/bash) -f pugixml.cpp.gcov
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ test: $(EXECUTABLE)
./$(EXECUTABLE)
@gcov -b -o $(BUILD)/src/ pugixml.cpp.gcda | sed -e '/./{H;$!d;}' -e 'x;/pugixml.cpp/!d;'
@find . -name '*.gcov' -and -not -name 'pugixml.cpp.gcov' -exec rm {} +
@sed -i -e "s/#####\(.*\)\(\/\/ unreachable.*\)/ 1\1\2/" pugixml.cpp.gcov
else
test: $(EXECUTABLE)
./$(EXECUTABLE)
Expand Down

0 comments on commit ba84465

Please sign in to comment.