diff --git a/.travis.yml b/.travis.yml index b4db5e4..5d91991 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,3 +17,5 @@ matrix: env: EXTRA="wine mingw-w64 mingw-w64-dev" REMOVE=mingw32 ARCH=32 - compiler: gcc env: EXTRA="wine mingw-w64 mingw-w64-dev" REMOVE=mingw32 ARCH=64 + - compiler: gcc + env: COVERAGE="--enable-coverage" EXTRA="libpcsclite-dev lcov" diff --git a/build-and-test.sh b/build-and-test.sh index a0a6c5b..aea1bef 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -1,7 +1,6 @@ #!/bin/sh set -e -set -x autoreconf -i @@ -13,6 +12,10 @@ if [ "x$ARCH" != "x" ]; then make -f windows.mk ${ARCH}bit VERSION=$version else - ./configure + ./configure $COVERAGE make check + if [ "x$COVERAGE" != "x" ]; then + gem install coveralls-lcov + coveralls-lcov --repo-token $COVERALLS_TOKEN coverage/app2.info + fi fi diff --git a/configure.ac b/configure.ac index 7be098d..3d884e7 100644 --- a/configure.ac +++ b/configure.ac @@ -120,12 +120,12 @@ else AC_MSG_ERROR([cannot find PCSC/winscard library/headers]) fi -AC_ARG_ENABLE([gcov], - [AS_HELP_STRING([--enable-gcov], +AC_ARG_ENABLE([coverage], + [AS_HELP_STRING([--enable-coverage], [use Gcov to test the test suite])], [], - [enable_gcov=no]) -AM_CONDITIONAL([ENABLE_COV],[test '!' "$enable_gcov" = no]) + [enable_cov=no]) +AM_CONDITIONAL([ENABLE_COV],[test '!' "$enable_cov" = no]) AC_ARG_ENABLE([gcc-warnings], [AS_HELP_STRING([--enable-gcc-warnings],