gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: -try to fix more of test-*.sh


From: gnunet
Subject: [taler-exchange] branch master updated: -try to fix more of test-*.sh
Date: Wed, 21 Sep 2022 10:47:07 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new f365fc07 -try to fix more of test-*.sh
f365fc07 is described below

commit f365fc0730c2243c4fdff5de91f3ad575106398f
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Wed Sep 21 10:46:57 2022 +0200

    -try to fix more of test-*.sh
---
 contrib/gana                           |  2 +-
 src/auditor/generate-auditor-basedb.sh | 21 ++++++++++++++-------
 src/auditor/test-auditor.sh            |  8 ++++++--
 src/auditor/test-revocation.sh         |  7 +++++--
 4 files changed, 26 insertions(+), 12 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/generate-auditor-basedb.sh 
b/src/auditor/generate-auditor-basedb.sh
index a24942df..469abbc3 100755
--- a/src/auditor/generate-auditor-basedb.sh
+++ b/src/auditor/generate-auditor-basedb.sh
@@ -32,22 +32,29 @@ function get_payto_uri() {
 # Cleanup to run whenever we exit
 function cleanup()
 {
-    for n in `jobs -p`
-    do
-        kill $n 2> /dev/null || true
-    done
-    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
+        PID=`cat libeufin-sandbox.pid 2> /dev/null`
+        kill $PID 2> /dev/null || true
+        wait $PID
+        rm libeufin-sandbox.pid
     fi
     if test -f libeufin-nexus.pid
     then
         echo "Killing libeufin nexus"
-        kill `cat libeufin-nexus.pid 2> /dev/null` &> /dev/null || true
+        PID=`cat libeufin-nexus.pid 2> /dev/null`
+        kill $PID 2> /dev/null || true
+        wait $PID
+        rm libeufin-nexus.pid
     fi
+    echo "killing libeufin DONE"
+    for n in `jobs -p`
+    do
+        kill $n 2> /dev/null || true
+    done
+    wait
 }
 
 # Install cleanup handler (except for kill -9)
diff --git a/src/auditor/test-auditor.sh b/src/auditor/test-auditor.sh
index 937da49f..831fec67 100755
--- a/src/auditor/test-auditor.sh
+++ b/src/auditor/test-auditor.sh
@@ -61,6 +61,9 @@ function exit_fail() {
     exit 1
 }
 
+# Clean up leftovers on start
+rm -f libeufin-sandbox.pid libeufin-nexus.pid
+
 function stop_libeufin()
 {
     echo "killing libeufin..."
@@ -68,7 +71,7 @@ function stop_libeufin()
     then
         echo "Killing libeufin sandbox"
         PID=`cat libeufin-sandbox.pid 2> /dev/null`
-        kill $PID || true
+        kill $PID 2> /dev/null || true
         wait $PID
         rm libeufin-sandbox.pid
     fi
@@ -76,7 +79,7 @@ function stop_libeufin()
     then
         echo "Killing libeufin nexus"
         PID=`cat libeufin-nexus.pid 2> /dev/null`
-        kill $PID || true
+        kill $PID 2> /dev/null || true
         wait $PID
         rm libeufin-nexus.pid
     fi
@@ -2079,6 +2082,7 @@ export PGHOST
 
 MYDIR=`mktemp -d /tmp/taler-auditor-basedbXXXXXX`
 echo "Generating fresh database at $MYDIR"
+rm -f $DB.sqlite3 2> /dev/null || true # libeufin
 if faketime -f '-1 d' ./generate-auditor-basedb.sh $MYDIR/$DB
 then
     check_with_database $MYDIR/$DB
diff --git a/src/auditor/test-revocation.sh b/src/auditor/test-revocation.sh
index 01158534..1aeb6b64 100755
--- a/src/auditor/test-revocation.sh
+++ b/src/auditor/test-revocation.sh
@@ -54,6 +54,9 @@ function exit_fail() {
     exit 1
 }
 
+# Clean up leftovers on start
+rm -f libeufin-sandbox.pid libeufin-nexus.pid
+
 function stop_libeufin()
 {
     echo "killing libeufin..."
@@ -61,7 +64,7 @@ function stop_libeufin()
     then
         echo "Killing libeufin sandbox"
         PID=`cat libeufin-sandbox.pid 2> /dev/null`
-        kill $PID || true
+        kill $PID 2> /dev/null || true
         wait $PID 
         rm libeufin-sandbox.pid
     fi
@@ -69,7 +72,7 @@ function stop_libeufin()
     then
         echo "Killing libeufin nexus"
         PID=`cat libeufin-nexus.pid 2> /dev/null`
-        kill $PID || true
+        kill $PID 2> /dev/null || true
         wait $PID 
         rm libeufin-nexus.pid
     fi

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]