#!/bin/bash set -eu cd $HOME/exchange git clean -fdx # like "git pull", but robust against force pushes # and local changes git fetch git reset --hard FETCH_HEAD ./bootstrap 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 fi make make install if test ${1:-notgiven} = "--coverage"; then TOP=$(pwd) mkdir -p doc/coverage/ lcov -d $TOP -z TALER_AUDITORDB_POSTGRES_CONFIG=$TALER_CHECKDB 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_AUDITORDB_POSTGRES_CONFIG=$TALER_CHECKDB TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB make check fi