4-test.sh (447B)
1 #!/bin/bash 2 set -evux 3 4 check_command() 5 { 6 # Set LD_LIBRARY_PATH so tests can find the installed libs 7 LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/taler:/usr/lib:/usr/lib/taler PGPORT=5432 make check 8 } 9 10 print_logs() 11 { 12 for i in src/*/test-suite.log 13 do 14 for FAILURE in $(grep '^FAIL:' ${i} | cut -d' ' -f2) 15 do 16 echo "Printing ${FAILURE}.log" 17 cat "$(dirname $i)/${FAILURE}.log" 18 done 19 done 20 } 21 22 if ! check_command ; then 23 print_logs 24 exit 1 25 fi