Skip to content

Commit

Permalink
travis: Make coveralls work again under docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ueno committed Dec 20, 2017
1 parent 6bf7580 commit 5ff4a74
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ language: c

env:
- BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64"
- BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 --enable-code-coverage" COVERAGE=yes
- BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 CFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread'"
- BUILD_OPTS="--prefix=/usr --libdir=/usr/lib64 CFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LIBS='-ldl -lpthread'"

Expand All @@ -25,6 +26,7 @@ before_install:
- docker exec $CONTAINER dnf -y install vala vala-devel
- docker exec $CONTAINER dnf -y install gnome-common
- docker exec $CONTAINER dnf -y install python-pip
- docker exec $CONTAINER dnf -y install git
- docker exec $CONTAINER useradd user

install:
Expand All @@ -36,6 +38,8 @@ script:
- docker exec $CONTAINER su - user sh -c "cd /srcdir && ./configure --enable-code-coverage $BUILD_OPTS"
- docker exec $CONTAINER su - user sh -c "cd /srcdir && make V=1 && touch po/libkkc.pot && make check V=1"

after_failure:
- docker exec $CONTAINER su - user sh -c "cd /srcdir && cat tests/test-suite.log"

after_success:
- docker exec $CONTAINER pip install cpp-coveralls
- docker exec $CONTAINER coveralls --exclude lib --exclude tests --gcov-options '\-lp'
- if test x"$COVERAGE" = xyes; then docker exec $CONTAINER pip install cpp-coveralls; docker exec -e TRAVIS_JOB_ID="$TRAVIS_JOB_ID" -e TRAVIS_BRANCH="$TRAVIS_BRANCH" $CONTAINER sh -c "cd /srcdir && coveralls --exclude tools --exclude tests --gcov-options '\-lp'"; fi

0 comments on commit 5ff4a74

Please sign in to comment.