4-test.sh (781B)
1 #!/bin/bash 2 set -evux 3 4 check_command() 5 { 6 # /usr/local is where the install step has put the libararies 7 export TALER_EXCHANGE_PREFIX=/usr/local 8 export TALER_AUDITOR_PREFIX=/usr/local 9 10 # bank and merchant are from the debian package, having /usr as 11 # their installation path's 12 export TALER_BANK_PREFIX=/usr 13 export TALER_MERCHANT_PREFIX=/usr 14 export LD_LIBRARY_PATH=/usr/local/lib:/usr/lib/x86_64-linux-gnu/taler-merchant 15 16 make check 17 } 18 19 print_logs() 20 { 21 set +e 22 for i in src/*/test-suite.log 23 do 24 echo "Printing ${i}" 25 cat "$i" 26 for FAILURE in $(grep '^FAIL:' ${i} | cut -d' ' -f2) 27 do 28 echo "Printing $(dirname $i)/${FAILURE}.log" 29 cat "$(dirname $i)/${FAILURE}.log" 30 done 31 done 32 } 33 34 if ! check_command ; then 35 print_logs 36 exit 1 37 fi