annotate libtests/run-tests.sh @ 512:6439cfba2524 memory-leaks

Implemented correct LSH table via compile-time switch -DLSH_DUMP_CORE_TABLES. Dumps on LSH load.
author mas01mc
date Fri, 23 Jan 2009 18:45:44 +0000
parents cd63493c32a9
children 4cb6c611f812 342822c2d49a
rev   line source
mas01ik@355 1 #! /bin/bash
mas01ik@355 2
mas01ik@355 3 AUDIODB=../../${EXECUTABLE:-audioDB}
mas01ik@355 4 export AUDIODB
mas01ik@355 5
mas01ik@355 6 if [ -x ${AUDIODB#../} ]; then
mas01ik@355 7 :
mas01ik@355 8 else
mas01ik@355 9 echo Cannot execute audioDB: ${AUDIODB#../}
mas01ik@355 10 exit 1
mas01ik@355 11 fi
mas01ik@355 12
mas01ik@355 13 if [ "$1" = "--full" ]; then
mas01ik@355 14 pattern="[0-9][0-9][0-9][0-9]*"
mas01ik@355 15 else
mas01ik@355 16 pattern="[0-8][0-9][0-9][0-9]*"
mas01ik@355 17 fi
mas01ik@355 18
mas01ik@355 19 for file in ${pattern}; do
mas01ik@355 20 if [ -d ${file} ]; then
mas01cr@373 21 if [ /bin/true ]; then
mas01ik@355 22 echo -n Running test ${file}
mas01ik@355 23 if [ -f ${file}/short-description ]; then
mas01ik@355 24 awk '{ printf(" (%s)",$0) }' < ${file}/short-description
mas01ik@355 25 fi
mas01ik@355 26 echo -n :
mas01cr@373 27 (cd ${file} && make -f ../libtest.mk >/dev/null 2>&1 && ./test1 > test.out 2> test.err && exit 104)
mas01ik@355 28 EXIT_STATUS=$?
mas01ik@355 29 if [ ${EXIT_STATUS} -eq 14 ]; then
mas01ik@355 30 echo " n/a."
mas01ik@355 31 elif [ ${EXIT_STATUS} -ne 104 ]; then
mas01ik@355 32 echo " failed (exit status ${EXIT_STATUS})."
mas01ik@355 33 FAILED=true
mas01ik@355 34 else
mas01ik@355 35 echo " success."
mas01ik@355 36 fi
mas01ik@355 37 else
mas01ik@355 38 echo Skipping test ${file}
mas01ik@355 39 fi
mas01ik@355 40 fi
mas01ik@355 41 done
mas01ik@355 42
mas01ik@355 43 if [ -z "${FAILED}" ]; then
mas01ik@355 44 exit 0
mas01ik@355 45 else
mas01ik@355 46 exit 1
mas01ik@355 47 fi