commit 70643725e3b2c79dd49d6bfa61420fa5648b810b parent c628710f30b91a83ffca30c5086101843b14e1bc Author: Marcello Stanisci <marcello.stanisci@inria.fr> Date: Mon, 19 Dec 2016 11:41:44 +0100 Coverage option to merchant build script Diffstat:
| M | taler-build/update_merchant.sh | | | 29 | ++++++++++++++++++++++++----- |
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/taler-build/update_merchant.sh b/taler-build/update_merchant.sh @@ -1,5 +1,7 @@ #!/bin/bash +# Run as: +# $ ./update_merchant.sh [--coverage] set -eu cd $HOME/merchant/ @@ -13,11 +15,28 @@ git reset --hard FETCH_HEAD git submodule update --init --force ./bootstrap -./configure CFLAGS='-ggdb -O0' \ - --prefix=$HOME/local --with-gnunet=$HOME/local \ - --with-mint=$HOME/local \ - --with-microhttpd=$HOME/local \ - --enable-logging=verbose +if "$1" = "--coverage"; then + ./configure CFLAGS='-ggdb -O0' \ + --prefix=$HOME/local --with-gnunet=$HOME/local \ + --with-mint=$HOME/local \ + --with-microhttpd=$HOME/local \ + --enable-logging=verbose \ + --enable-coverage + else + ./configure CFLAGS='-ggdb -O0' \ + --prefix=$HOME/local --with-gnunet=$HOME/local \ + --with-mint=$HOME/local \ + --with-microhttpd=$HOME/local \ + --enable-logging=verbose + make make install TALER_MERCHANTDB_POSTGRES_CONFIG=$TALER_CHECKDB TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB make check + +if "$1" = "--coverage"; then + TOP=$(pwd) + mkdir -p doc/coverage/ + lcov -d $TOP -z + 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