summaryrefslogtreecommitdiff
path: root/taler-build/update_exchange.sh
diff options
context:
space:
mode:
Diffstat (limited to 'taler-build/update_exchange.sh')
-rwxr-xr-xtaler-build/update_exchange.sh33
1 files changed, 27 insertions, 6 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