aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-16 09:43:55 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-16 14:04:45 +0100
commit549ae48741234f36477b4419215207da026051c9 (patch)
tree1798dd971b936294486b3591855456f18d9755ef
parentebbf5cd600ccb724ecd2b2876422b6ca9b5d06fd (diff)
downloadvis-549ae48741234f36477b4419215207da026051c9.tar.gz
vis-549ae48741234f36477b4419215207da026051c9.tar.xz
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.
-rw-r--r--.travis.yml29
1 files changed, 17 insertions, 12 deletions
diff --git a/.travis.yml b/.travis.yml
index a14ae16..ab7ee0b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -16,6 +16,9 @@ matrix:
env: TARGET=debug
- os: linux
compiler: gcc
+ env: TARGET=clean
+ - os: linux
+ compiler: gcc
env: TARGET= CONFIG=--disable-lua
- os: osx
compiler: clang
@@ -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)