[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated (fed7102a -> 1081f3ed)
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated (fed7102a -> 1081f3ed) |
Date: |
Tue, 13 Sep 2022 13:22:34 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a change to branch master
in repository exchange.
from fed7102a -fix test-auditor.sh
new bca7f21f -work on auditor tests
new 1081f3ed -work on auditor tests
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
contrib/gana | 2 +-
doc/prebuilt | 2 +-
src/auditor/generate-auditor-basedb.sh | 14 +++++++--
src/auditor/test-auditor.sh | 56 ++++++++++++++++++++++------------
src/auditor/test-revocation.sh | 14 +++++----
5 files changed, 58 insertions(+), 30 deletions(-)
diff --git a/contrib/gana b/contrib/gana
index 75c838e7..5f6a1413 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 75c838e74c41bf9a6c02cdfe8109a444056bf26d
+Subproject commit 5f6a1413a6053d1999064768188f1671eb015897
diff --git a/doc/prebuilt b/doc/prebuilt
index 74d9c44e..b988d98d 160000
--- a/doc/prebuilt
+++ b/doc/prebuilt
@@ -1 +1 @@
-Subproject commit 74d9c44ebc257a3d8b9c2c0a806508bd0cc5269a
+Subproject commit b988d98d4856758484eb23c27bfdc9e602d4235a
diff --git a/src/auditor/generate-auditor-basedb.sh
b/src/auditor/generate-auditor-basedb.sh
index d4d5cf83..09018f0c 100755
--- a/src/auditor/generate-auditor-basedb.sh
+++ b/src/auditor/generate-auditor-basedb.sh
@@ -36,10 +36,18 @@ function cleanup()
do
kill $n 2> /dev/null || true
done
- echo Killing euFin..
- kill `cat libeufin-sandbox.pid 2> /dev/null` &> /dev/null || true
- kill `cat libeufin-nexus.pid 2> /dev/null` &> /dev/null || true
wait
+ echo "Killing Libeufin..."
+ if test -f libeufin-sandbox.pid
+ then
+ echo "Killing libeufin sandbox"
+ kill `cat libeufin-sandbox.pid 2> /dev/null` &> /dev/null || true
+ fi
+ if test -f libeufin-nexus.pid
+ then
+ echo "Killing libeufin nexus"
+ kill `cat libeufin-nexus.pid 2> /dev/null` &> /dev/null || true
+ fi
}
# Install cleanup handler (except for kill -9)
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 1b48acbd..803d3ad9 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -61,19 +61,19 @@ function exit_fail() {
exit 1
}
-# Cleanup to run whenever we exit
+# Cleanup exchange and libeufin between runs.
function cleanup()
{
- if test ! -z ${POSTGRES_PATH:-}
+ if test ! -z ${EPID:-}
then
- ${POSTGRES_PATH}/pg_ctl -D $TMPDIR -l /dev/null stop &> /dev/null ||
true
+ echo -n "Stopping exchange..."
+ kill -TERM $EPID
+ wait $EPID
+ echo " DONE"
+ unset EPID
fi
- for n in `jobs -p`
- do
- kill $n 2> /dev/null || true
- done
- wait
- # kill euFin
+
+ echo "killing libeufin..."
if test -f libeufin-sandbox.pid
then
echo "Killing libeufin sandbox"
@@ -87,8 +87,26 @@ function cleanup()
echo DONE
}
+# Cleanup to run whenever we exit
+function exit_cleanup()
+{
+ echo "Running exit-cleanup"
+ if test ! -z ${POSTGRES_PATH:-}
+ then
+ echo "Stopping Postgres at ${POSTGRES_PATH}"
+ ${POSTGRES_PATH}/pg_ctl -D $TMPDIR -l /dev/null stop &> /dev/null ||
true
+ fi
+ for n in `jobs -p`
+ do
+ kill $n 2> /dev/null || true
+ done
+ wait
+ cleanup
+ echo "DONE"
+}
+
# Install cleanup handler (except for kill -9)
-trap cleanup EXIT
+trap exit_cleanup EXIT
function launch_libeufin () {
export LIBEUFIN_NEXUS_DB_CONNECTION="jdbc:sqlite:$DB.sqlite3"
@@ -292,14 +310,14 @@ function run_audit () {
# Do a full reload of the (original) database
-full_reload()
+function full_reload()
{
- echo "Doing full reload of the database ($BASEDB)... "
+ echo "Doing full reload of the database ($BASEDB - $DB)... "
dropdb $DB 2> /dev/null || true
rm -f $DB.sqlite3 2> /dev/null || true # libeufin
- createdb -T template0 $DB || exit_skip "could not create database"
+ createdb -T template0 $DB || exit_skip "could not create database $DB (at
$PGHOST)"
# Import pre-generated database, -q(ietly) using single (-1) transaction
- psql -Aqt $DB -q -1 -f ${BASEDB}.sql > /dev/null || exit_skip "Failed to
load database"
+ psql -Aqt $DB -q -1 -f ${BASEDB}.sql > /dev/null || exit_skip "Failed to
load database $DB from ${BASEDB}.sql"
echo "Loading libeufin basedb: ${BASEDB}-libeufin.sql"
sqlite3 $DB.sqlite3 < ${BASEDB}-libeufin.sql || exit_skip "Failed to load
libEufin database"
echo "DONE"
@@ -2017,11 +2035,11 @@ MYDIR=`mktemp -d /tmp/taler-auditor-basedbXXXXXX`
echo -n "Testing for Postgres"
-HAVE_INITDB=`find /usr -name "initdb" | grep postgres` || exit_skip " MISSING"
-echo " FOUND"
+HAVE_INITDB=`find /usr -name "initdb" 2> /dev/null | grep postgres` ||
exit_skip " MISSING"
+echo " FOUND at" `dirname $HAVE_INITDB`
echo -n "Setting up Postgres DB"
-INITDB_BIN=`find /usr -name "initdb" | grep bin/initdb | grep postgres | sort
-n | tail -n1`
-POSTGRES_PATH=`basename $INITDB_BIN`
+INITDB_BIN=`echo $HAVE_INITDB | grep bin/initdb | grep postgres | sort -n |
tail -n1`
+POSTGRES_PATH=`dirname $INITDB_BIN`
TMPDIR=`mktemp -d /tmp/taler-test-postgresXXXXXX`
$INITDB_BIN --no-sync --auth=trust -D ${TMPDIR} > postgres-dbinit.log 2>
postgres-dbinit.err
echo " DONE"
@@ -2040,7 +2058,7 @@ mv $TMPDIR/pg_hba.conf.new $TMPDIR/pg_hba.conf
${POSTGRES_PATH}/pg_ctl -D $TMPDIR -l /dev/null start > postgres-start.log 2>
postgres-start.err
echo " DONE"
PGHOST="$TMPDIR/sockets"
-EXPORT PGHOST="@POSTGRES_SOCKET"
+export PGHOST
echo "Generating fresh database at $MYDIR"
diff --git a/src/auditor/test-revocation.sh b/src/auditor/test-revocation.sh
index 2809b8ea..4fa26f3e 100755
--- a/src/auditor/test-revocation.sh
+++ b/src/auditor/test-revocation.sh
@@ -600,16 +600,16 @@ echo "Testing for taler-wallet-cli"
taler-wallet-cli -h >/dev/null </dev/null 2>/dev/null || exit_skip
"taler-wallet-cli required"
echo -n "Testing for Postgres"
-HAVE_INITDB=`find /usr -name "initdb" | grep postgres` || exit_skip " MISSING"
-echo " FOUND"
+HAVE_INITDB=`find /usr -name "initdb" 2> /dev/null | grep postgres 2>
/dev/null` || exit_skip " MISSING"
+echo " FOUND at" `dirname $HAVE_INITDB`
echo -n "Setting up Postgres DB"
-INITDB_BIN=`find /usr -name "initdb" | grep bin/initdb | grep postgres | sort
-n | tail -n1`
-POSTGRES_PATH=`basename $INITDB_BIN`
+INITDB_BIN=`echo $HAVE_INITDB | grep bin/initdb | grep postgres | sort -n |
tail -n1 2> /dev/null`
+POSTGRES_PATH=`dirname $INITDB_BIN`
TMPDIR=`mktemp -d /tmp/taler-test-postgresXXXXXX`
$INITDB_BIN --no-sync --auth=trust -D ${TMPDIR} > postgres-dbinit.log 2>
postgres-dbinit.err
echo " DONE"
mkdir ${TMPDIR}/sockets
-echo -n "Launching Postgres service"
+echo -n "Launching Postgres service at $POSTGRES_PATH"
cat - >> $TMPDIR/postgresql.conf <<EOF
unix_socket_directories='${TMPDIR}/sockets'
fsync=off
@@ -623,7 +623,9 @@ mv $TMPDIR/pg_hba.conf.new $TMPDIR/pg_hba.conf
${POSTGRES_PATH}/pg_ctl -D $TMPDIR -l /dev/null start > postgres-start.log 2>
postgres-start.err
echo " DONE"
PGHOST="$TMPDIR/sockets"
-EXPORT PGHOST="@POSTGRES_SOCKET"
+export PGHOST
+
+bash
MYDIR=`mktemp -d /tmp/taler-auditor-basedbXXXXXX`
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-exchange] branch master updated (fed7102a -> 1081f3ed),
gnunet <=