From 549ae48741234f36477b4419215207da026051c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 16 Feb 2017 09:43:55 +0100 Subject: travis: try to fix code coverage for test/core The test/core tests use source files from the repository root (e.g. ../../text.c) which seems to confuse gcov and/or codecov.io because the same file is used under multiple paths. We add a new entry to the test matrix which just runs the core/tests. This is done by invoking the `make clean` target and skipping any tests which require the main vis binary. --- .travis.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index a14ae16..ab7ee0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,9 @@ matrix: - os: linux compiler: clang env: TARGET=debug + - os: linux + compiler: gcc + env: TARGET=clean - os: linux compiler: gcc env: TARGET= CONFIG=--disable-lua @@ -60,19 +63,21 @@ script: fi - ./configure CFLAGS="-I$(pwd)/dependency/install/usr/include" LDFLAGS="-L$(pwd)/dependency/install/usr/lib" $CONFIG - make CFLAGS_EXTRA=--coverage $TARGET - - file vis - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then - otool -L vis; - else - ldd vis; + - if [ -e vis ]; then + LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" ./vis -v; + file vis; + size vis; + if [ "$TRAVIS_OS_NAME" = "osx" ]; then + otool -L vis; + else + ldd vis; + fi fi - - size vis - - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" ./vis -v - - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/core coverage - - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/lua - - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vis - - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/sam - - LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vim + - make -C test/core coverage + - [ ! -e vis ] || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/lua + - [ ! -e vis ] || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vis + - [ ! -e vis ] || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/sam + - [ ! -e vis ] || LD_LIBRARY_PATH="$(pwd)/dependency/install/usr/lib" make -C test/vim after_success: - bash <(curl -s https://codecov.io/bash) -- cgit v1.2.3