4-test.sh (794B)
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 echo "========BEGIN======" 18 cat "$(dirname $i)/${FAILURE}.log" 19 echo "=========END=======" 20 echo "End of ${FAILURE}.log" 21 done 22 done 23 for LOGFILE in src/testing/*.log 24 do 25 echo "Printing ${LOGFILE}" 26 echo "========BEGIN======" 27 cat "${LOGFILE}" 28 echo "=========END=======" 29 echo "End of ${LOGFILE}" 30 done 31 } 32 33 if ! check_command ; then 34 print_logs 35 exit 1 36 fi