gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 01/02: [exchange] fix auditor tests in container


From: gnunet
Subject: [taler-exchange] 01/02: [exchange] fix auditor tests in container
Date: Thu, 12 Dec 2024 22:54:45 +0100

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

oec pushed a commit to branch master
in repository exchange.

commit 6fb685d27a8d7251762e0591e5d3f0177b4ad810
Author: Özgür Kesim <oec-taler@kesim.org>
AuthorDate: Thu Dec 12 22:47:13 2024 +0100

    [exchange] fix auditor tests in container
    
    Multiple issues fixed:
    
    - missing debian packages for auditor tests added to Containerfile:
      faketime, libeufin-{common,nexus,bank}, taler-wallet-cli, taler-merchant
    
    - missing TALER_*_PREFIX environment set prior to tests,
      some /usr/local, some /usr (merchant from debian, f.e.).
    
    - LD_LIBRARY_PATH adjusted for /usr/local and debian-merchant lib
    
    - initdb step skipped in case of root user calling the test-scripts
    
    Fixes #9380
---
 contrib/ci/jobs/002-test/1-build.sh   | 20 +++++++++++++++++++
 contrib/ci/jobs/002-test/2-install.sh |  4 ++++
 contrib/ci/jobs/002-test/3-startdb.sh |  9 +++++++++
 contrib/ci/jobs/002-test/4-test.sh    | 37 +++++++++++++++++++++++++++++++++++
 4 files changed, 70 insertions(+)

diff --git a/contrib/ci/jobs/002-test/1-build.sh 
b/contrib/ci/jobs/002-test/1-build.sh
new file mode 100755
index 000000000..e8378dd43
--- /dev/null
+++ b/contrib/ci/jobs/002-test/1-build.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+set -evux
+
+apt-get update
+apt-get upgrade -yqq
+
+./bootstrap
+./configure CFLAGS="-ggdb -O0" \
+           --enable-logging=verbose \
+           --disable-doc
+
+nump=$(grep processor /proc/cpuinfo | wc -l)
+make clean
+make -j$(( $nump / 2 ))
+cd src/templating/
+./run-original-tests.sh
+make clean
+cd -
+make -j$(( $nump / 2 ))
+
diff --git a/contrib/ci/jobs/002-test/2-install.sh 
b/contrib/ci/jobs/002-test/2-install.sh
new file mode 100755
index 000000000..41bb3c019
--- /dev/null
+++ b/contrib/ci/jobs/002-test/2-install.sh
@@ -0,0 +1,4 @@
+#!/bin/bash
+set -evux
+
+make install
diff --git a/contrib/ci/jobs/002-test/3-startdb.sh 
b/contrib/ci/jobs/002-test/3-startdb.sh
new file mode 100755
index 000000000..e1f6bce5f
--- /dev/null
+++ b/contrib/ci/jobs/002-test/3-startdb.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+set -evux
+
+export PGPORT=5432
+sudo -u postgres /usr/lib/postgresql/15/bin/pg_ctl \
+    start -D /etc/postgresql/15/main -o "-h localhost -p $PGPORT"
+sudo -u postgres createuser -p $PGPORT root -s -w
+sudo -u postgres createdb -p $PGPORT -O root talercheck
+
diff --git a/contrib/ci/jobs/002-test/4-test.sh 
b/contrib/ci/jobs/002-test/4-test.sh
new file mode 100755
index 000000000..bfae0f953
--- /dev/null
+++ b/contrib/ci/jobs/002-test/4-test.sh
@@ -0,0 +1,37 @@
+#!/bin/bash
+set -evux
+
+check_command()
+{
+    # /usr/local is where the install step has put the libararies
+    export TALER_EXCHANGE_PREFIX=/usr/local
+    export TALER_AUDITOR_PREFIX=/usr/local
+
+    # bank and merchant are from the debian package, having /usr as
+    # their installation path's
+    export TALER_BANK_PREFIX=/usr
+    export TALER_MERCHANT_PREFIX=/usr
+    export 
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib/x86_64-linux-gnu/taler-merchant
+
+    make check
+}
+
+print_logs()
+{
+    set +e
+       for i in src/*/test-suite.log
+       do
+               echo "Printing ${i}"
+        cat "$i"
+               for FAILURE in $(grep '^FAIL:' ${i} | cut -d' ' -f2)
+               do
+                       echo "Printing $(dirname $i)/${FAILURE}.log"
+                       cat "$(dirname $i)/${FAILURE}.log"
+               done
+       done
+}
+
+if ! check_command ; then
+       print_logs
+       exit 1
+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]