From 3ab39378333e5a5a3e34d7b777f4285097ea4e7a Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Mon, 19 Dec 2016 15:03:06 +0100 Subject: Adapting exchange to new coverage script. --- taler-build/update_exchange.sh | 33 +++++++++++++++++++++++++++------ taler-build/update_merchant.sh | 4 ++-- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/taler-build/update_exchange.sh b/taler-build/update_exchange.sh index b9c48b9..7aa9f5b 100755 --- a/taler-build/update_exchange.sh +++ b/taler-build/update_exchange.sh @@ -11,11 +11,32 @@ git fetch git reset --hard FETCH_HEAD ./bootstrap -./configure CFLAGS='-ggdb -O0' \ - --with-libgnurl=$HOME/local \ - --with-microhttpd=$HOME/local \ - --prefix=$HOME/local --with-gnunet=$HOME/local \ - --enable-logging=verbose +if test ${1:-notgiven} = "--coverage"; then + ./configure CFLAGS='-ggdb -O0' \ + --with-libgnurl=$HOME/local \ + --with-microhttpd=$HOME/local \ + --prefix=$HOME/local --with-gnunet=$HOME/local \ + --enable-logging=verbose \ + --enable-coverage +else + ./configure CFLAGS='-ggdb -O0' \ + --with-libgnurl=$HOME/local \ + --with-microhttpd=$HOME/local \ + --prefix=$HOME/local --with-gnunet=$HOME/local \ + --enable-logging=verbose make make install -TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB TALER_AUDITORDB_POSTGRES_CONFIG=$TALER_CHECKDB make check + +if test ${1:-notgiven} = "--coverage"; then +TOP=$(pwd) + mkdir -p doc/coverage/ + lcov -d $TOP -z + # the 'exit 1' seems mandatory for the next commands to work. Where is that + # documented? + TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB make check || exit 1 + lcov -d $TOP -c --no-external -o doc/coverage/coverage.info + lcov -r doc/coverage/coverage.info **/test_* -o doc/coverage/rcoverage.info + genhtml -o doc/coverage doc/coverage/rcoverage.info +else + TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB make check +fi diff --git a/taler-build/update_merchant.sh b/taler-build/update_merchant.sh index 9cc0772..5efa0ae 100755 --- a/taler-build/update_merchant.sh +++ b/taler-build/update_merchant.sh @@ -39,10 +39,10 @@ TOP=$(pwd) lcov -d $TOP -z # the 'exit 1' seems mandatory for the next commands to work. Where is that # documented? - TALER_MERCHANTDB_POSTGRES_CONFIG=$TALER_CHECKDB TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB make check || exit 1 + TALER_MERCHANTDB_POSTGRES_CONFIG=$TALER_CHECKDB make check || exit 1 lcov -d $TOP -c --no-external -o doc/coverage/coverage.info lcov -r doc/coverage/coverage.info **/test_* -o doc/coverage/rcoverage.info genhtml -o doc/coverage doc/coverage/rcoverage.info else - TALER_MERCHANTDB_POSTGRES_CONFIG=$TALER_CHECKDB TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB make check + TALER_MERCHANTDB_POSTGRES_CONFIG=$TALER_CHECKDB make check fi -- cgit v1.2.3