blob: 3e2d476f487c135735f2296a1171b5f3e7269c07 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
#!/bin/bash
# Run as:
# $ ./update_merchant.sh [--coverage]
set -eu
source cat_failed.sh
cd $HOME/merchant/
git clean -fdx
git fetch
# reset to updated upstream branch, but only if we're tracking a branch
branch=$(git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null || echo HEAD)
git reset --hard "$branch"
git submodule update --init --force
./bootstrap
if test ${1:-notgiven} = "--coverage"; then
./configure CFLAGS='-ggdb -O0' \
--prefix=$HOME/local --with-gnunet=$HOME/local \
--with-exchange=$HOME/local \
--with-microhttpd=$HOME/local \
--with-twister=$HOME/local \
--enable-logging=verbose \
--enable-coverage \
--disable-doc
else
./configure CFLAGS='-ggdb -O0' \
--prefix=$HOME/local --with-gnunet=$HOME/local \
--with-exchange=$HOME/local \
--with-microhttpd=$HOME/local \
--with-twister=$HOME/local \
--enable-logging=verbose \
--disable-doc
fi
make
make install
TALER_CHECKDB=${TALER_CHECKDB:-postgres:///WILLFAIL}
if test ${1:-notgiven} = "--coverage"; then
TOP=$(pwd)
mkdir -p doc/coverage/
lcov -d $TOP -z
TALER_MERCHANTDB_POSTGRES_CONFIG=$TALER_CHECKDB \
TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB \
TALER_AUDITORDB_POSTGRES_CONFIG=$TALER_CHECKDB \
make check || (cat_failed .; 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
chmod a+rx -R doc/
else
TALER_MERCHANTDB_POSTGRES_CONFIG=$TALER_CHECKDB \
TALER_EXCHANGEDB_POSTGRES_CONFIG=$TALER_CHECKDB \
TALER_AUDITORDB_POSTGRES_CONFIG=$TALER_CHECKDB \
make check || (cat_failed .; exit 1)
fi
|