[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: auditor tests: make initdb invoc
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: auditor tests: make initdb invocation more portable |
Date: |
Mon, 19 Sep 2022 14:04:57 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 1aed3c1f auditor tests: make initdb invocation more portable
1aed3c1f is described below
commit 1aed3c1fd2a9998800b0ab35e7a7bd3b4da1cf54
Author: Florian Dold <florian@dold.me>
AuthorDate: Mon Sep 19 14:04:53 2022 +0200
auditor tests: make initdb invocation more portable
---
contrib/gana | 2 +-
src/auditor/test-auditor.sh | 12 +++++++++---
src/auditor/test-revocation.sh | 12 +++++++++---
src/auditor/test-sync.sh | 12 +++++++++---
4 files changed, 28 insertions(+), 10 deletions(-)
diff --git a/contrib/gana b/contrib/gana
index d402af78..9dee7d6e 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit d402af78f6d360841db53baa46dddae13590ec33
+Subproject commit 9dee7d6e8f967fdc58ae224e19ec03989ac35c52
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index d1e24c19..ec5a4585 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -2041,10 +2041,16 @@ MYDIR=`mktemp -d /tmp/taler-auditor-basedbXXXXXX`
echo -n "Testing for Postgres"
-HAVE_INITDB=`find /usr -name "initdb" 2> /dev/null | grep postgres` ||
exit_skip " MISSING"
-echo " FOUND at" `dirname $HAVE_INITDB`
+# Available directly in path?
+INITDB_BIN=$(command -v initdb)
+if [[ ! -z $INITDB_BIN ]]; then
+ echo " FOUND (in path) at" $INITDB_BIN
+else
+ HAVE_INITDB=`find /usr -name "initdb" 2> /dev/null | grep postgres` ||
exit_skip " MISSING"
+ echo " FOUND at" `dirname $HAVE_INITDB`
+ INITDB_BIN=`echo $HAVE_INITDB | grep bin/initdb | grep postgres | sort -n |
tail -n1`
+fi
echo -n "Setting up Postgres DB"
-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
diff --git a/src/auditor/test-revocation.sh b/src/auditor/test-revocation.sh
index ddb8476c..354e7f80 100755
--- a/src/auditor/test-revocation.sh
+++ b/src/auditor/test-revocation.sh
@@ -600,10 +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" 2> /dev/null | grep postgres 2>
/dev/null` || exit_skip " MISSING"
-echo " FOUND at" `dirname $HAVE_INITDB`
+# Available directly in path?
+INITDB_BIN=$(command -v initdb)
+if [[ ! -z $INITDB_BIN ]]; then
+ echo " FOUND (in path) at" $INITDB_BIN
+else
+ HAVE_INITDB=`find /usr -name "initdb" 2> /dev/null | grep postgres` ||
exit_skip " MISSING"
+ echo " FOUND at" `dirname $HAVE_INITDB`
+ INITDB_BIN=`echo $HAVE_INITDB | grep bin/initdb | grep postgres | sort -n |
tail -n1`
+fi
echo -n "Setting up Postgres DB"
-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
diff --git a/src/auditor/test-sync.sh b/src/auditor/test-sync.sh
index c8f6ea8f..911dfed0 100755
--- a/src/auditor/test-sync.sh
+++ b/src/auditor/test-sync.sh
@@ -109,10 +109,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" 2> /dev/null | grep postgres` ||
exit_skip " MISSING"
-echo " FOUND at" `dirname $HAVE_INITDB`
+# Available directly in path?
+INITDB_BIN=$(command -v initdb)
+if [[ ! -z $INITDB_BIN ]]; then
+ echo " FOUND (in path) at" $INITDB_BIN
+else
+ HAVE_INITDB=`find /usr -name "initdb" 2> /dev/null | grep postgres` ||
exit_skip " MISSING"
+ echo " FOUND at" `dirname $HAVE_INITDB`
+ INITDB_BIN=`echo $HAVE_INITDB | grep bin/initdb | grep postgres | sort -n |
tail -n1`
+fi
echo -n "Setting up Postgres DB"
-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
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: auditor tests: make initdb invocation more portable,
gnunet <=