diff options
Diffstat (limited to 'contrib/ci/jobs/2-test')
-rw-r--r-- | contrib/ci/jobs/2-test/config.ini | 6 | ||||
-rwxr-xr-x | contrib/ci/jobs/2-test/job.sh | 6 | ||||
-rwxr-xr-x | contrib/ci/jobs/2-test/test.sh | 51 |
3 files changed, 63 insertions, 0 deletions
diff --git a/contrib/ci/jobs/2-test/config.ini b/contrib/ci/jobs/2-test/config.ini new file mode 100644 index 000000000..49cc8ea8a --- /dev/null +++ b/contrib/ci/jobs/2-test/config.ini @@ -0,0 +1,6 @@ +[build] +HALT_ON_FAILURE = False +WARN_ON_FAILURE = True +CONTAINER_BUILD = True +CONTAINER_NAME = localhost/exchange +CONTAINER_ARCH = amd64 diff --git a/contrib/ci/jobs/2-test/job.sh b/contrib/ci/jobs/2-test/job.sh new file mode 100755 index 000000000..bfb24e335 --- /dev/null +++ b/contrib/ci/jobs/2-test/job.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -exuo pipefail + +job_dir=$(dirname "${BASH_SOURCE[0]}") + +"${job_dir}"/test.sh diff --git a/contrib/ci/jobs/2-test/test.sh b/contrib/ci/jobs/2-test/test.sh new file mode 100755 index 000000000..a0002f226 --- /dev/null +++ b/contrib/ci/jobs/2-test/test.sh @@ -0,0 +1,51 @@ +#!/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 )) +make install + +sudo -u postgres /usr/lib/postgresql/15/bin/postgres -D /etc/postgresql/15/main -h localhost -p 5432 & +sleep 10 +sudo -u postgres createuser -p 5432 root +sudo -u postgres createdb -p 5432 -O root talercheck + +check_command() +{ + # Set LD_LIBRARY_PATH so tests can find the installed libs + LD_LIBRARY_PATH=/usr/local/lib PGPORT=5432 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 |