annotate libtests/run-tests.sh @ 369:6564be3109c5 gcc-4.3-cleanups

gcc-4.3 warning cleanups for lshlib.cpp (I do not believe that any of these changes contain significant copyrightable "intellectual property". However, to the extent that they do, the changes are hereby released into the Public Domain, and may be therefore be used by anyone for any purpose without need for consideration of any kind.)
author mas01cr
date Wed, 12 Nov 2008 15:23:32 +0000
parents 94c18f128ce8
children cd63493c32a9
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 LD_LIBRARY_PATH=../
mas01ik@355 7 export LD_LIBRARY_PATH
mas01ik@355 8
mas01ik@355 9 if [ -x ${AUDIODB#../} ]; then
mas01ik@355 10 :
mas01ik@355 11 else
mas01ik@355 12 echo Cannot execute audioDB: ${AUDIODB#../}
mas01ik@355 13 exit 1
mas01ik@355 14 fi
mas01ik@355 15
mas01ik@355 16 if [ "$1" = "--full" ]; then
mas01ik@355 17 pattern="[0-9][0-9][0-9][0-9]*"
mas01ik@355 18 else
mas01ik@355 19 pattern="[0-8][0-9][0-9][0-9]*"
mas01ik@355 20 fi
mas01ik@355 21
mas01ik@355 22 for file in ${pattern}; do
mas01ik@355 23 if [ -d ${file} ]; then
mas01ik@355 24 if [ -f ${file}/run-test.sh ]; then
mas01ik@355 25 echo -n Running test ${file}
mas01ik@355 26 if [ -f ${file}/short-description ]; then
mas01ik@355 27 awk '{ printf(" (%s)",$0) }' < ${file}/short-description
mas01ik@355 28 fi
mas01ik@355 29 echo -n :
mas01ik@355 30 (cd ${file} && /bin/bash ./run-test.sh > test.out 2> test.err)
mas01ik@355 31 EXIT_STATUS=$?
mas01ik@355 32 if [ ${EXIT_STATUS} -eq 14 ]; then
mas01ik@355 33 echo " n/a."
mas01ik@355 34 elif [ ${EXIT_STATUS} -ne 104 ]; then
mas01ik@355 35 echo " failed (exit status ${EXIT_STATUS})."
mas01ik@355 36 FAILED=true
mas01ik@355 37 else
mas01ik@355 38 echo " success."
mas01ik@355 39 fi
mas01ik@355 40 else
mas01ik@355 41 echo Skipping test ${file}
mas01ik@355 42 fi
mas01ik@355 43 fi
mas01ik@355 44 done
mas01ik@355 45
mas01ik@355 46 if [ -z "${FAILED}" ]; then
mas01ik@355 47 exit 0
mas01ik@355 48 else
mas01ik@355 49 exit 1
mas01ik@355 50 fi