Skip to content

Commit

Permalink
Request gcov-4.8 on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
igrr committed Mar 3, 2016
1 parent de2c815 commit 678a8ff
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ addons:

script:
- set -e
- export CXX="g++-4.8" CC="gcc-4.8"
- export CXX="g++-4.8" CC="gcc-4.8" GCOV="gcov-4.8"
- pushd $TRAVIS_BUILD_DIR/tests/host
- make test gcov
- make
- bash <(curl -s https://codecov.io/bash) -X gcov
- make clean
- popd
Expand Down
15 changes: 13 additions & 2 deletions tests/host/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ ifeq ($(shell uname -s),Darwin)
CC := gcc
CXX := g++
endif
GCOV ?= gcov

CORE_CPP_FILES := $(addprefix $(CORE_PATH)/,\
StreamString.cpp \
Expand Down Expand Up @@ -56,7 +57,7 @@ CPP_OBJECTS = $(CPP_SOURCE_FILES:.cpp=.cpp.o)
OBJECTS = $(C_OBJECTS) $(CPP_OBJECTS)
COVERAGE_FILES = $(OBJECTS:.o=.gc*)

all: $(OUTPUT_BINARY) test
all: build-info $(OUTPUT_BINARY) test gcov

test: $(OUTPUT_BINARY)
$(OUTPUT_BINARY)
Expand All @@ -67,7 +68,17 @@ clean:
rm -rf $(COVERAGE_FILES) *.gcov

gcov: test
find $(CORE_PATH) -name "*.gcno" -exec gcov -r -pb {} +
find $(CORE_PATH) -name "*.gcno" -exec $(GCOV) -r -pb {} +

build-info:
echo "-------- build tools info --------"
echo "CC: " $(CC)
$(CC) -v
echo "CXX: " $(CXX)
$(CXX) -v
echo "GCOV: " $(GCOV)
$(GCOV) -v
echo "----------------------------------"

$(BINARY_DIRECTORY):
mkdir -p $@
Expand Down

0 comments on commit 678a8ff

Please sign in to comment.