vis

a vi-like editor based on Plan 9's structural regular expressions

git clone https://9o.is/git/vis.git

commit acbec4a5ddc50cd652c979bc4a07532746d6128a
parent 1a733195422e607532cb0e8128c3b10084d158fa
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Thu, 16 Feb 2017 09:43:55 +0100

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.

Diffstat:
M.travis.yml | 29+++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)

diff --git 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)