diff options
Diffstat (limited to 'ci/jobs/2-test/test.sh')
-rwxr-xr-x | ci/jobs/2-test/test.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/ci/jobs/2-test/test.sh b/ci/jobs/2-test/test.sh new file mode 100755 index 000000000..6c3d2be21 --- /dev/null +++ b/ci/jobs/2-test/test.sh @@ -0,0 +1,33 @@ +#!/bin/bash +set -evu + +./bootstrap +./configure CFLAGS="-ggdb -O0" \ + --enable-logging=verbose \ + --disable-doc +make +make install + + +check_command() +{ + # Set LD_LIBRARY_PATH so tests can find the installed libs + LD_LIBRARY_PATH=/usr/local/lib make check +} + +print_logs() +{ + for i in src/*/test-suite.log + do + FAILURE="$(grep '^FAIL:' ${i} | cut -d' ' -f2)" + if [ ! -z "${FAILURE}" ]; then + echo "Printing ${FAILURE}.log" + tail "$(dirname $i)/${FAILURE}.log" + fi + done +} + +if ! check_command ; then + print_logs + exit 1 +fi |