mas01ik@355: #! /bin/bash mas01ik@355: mas01ik@355: AUDIODB=../../${EXECUTABLE:-audioDB} mas01ik@355: export AUDIODB mas01ik@355: mas01ik@355: LD_LIBRARY_PATH=../ mas01ik@355: export LD_LIBRARY_PATH mas01ik@355: mas01ik@355: if [ -x ${AUDIODB#../} ]; then mas01ik@355: : mas01ik@355: else mas01ik@355: echo Cannot execute audioDB: ${AUDIODB#../} mas01ik@355: exit 1 mas01ik@355: fi mas01ik@355: mas01ik@355: if [ "$1" = "--full" ]; then mas01ik@355: pattern="[0-9][0-9][0-9][0-9]*" mas01ik@355: else mas01ik@355: pattern="[0-8][0-9][0-9][0-9]*" mas01ik@355: fi mas01ik@355: mas01ik@355: for file in ${pattern}; do mas01ik@355: if [ -d ${file} ]; then mas01ik@355: if [ -f ${file}/run-test.sh ]; then mas01ik@355: echo -n Running test ${file} mas01ik@355: if [ -f ${file}/short-description ]; then mas01ik@355: awk '{ printf(" (%s)",$0) }' < ${file}/short-description mas01ik@355: fi mas01ik@355: echo -n : mas01ik@355: (cd ${file} && /bin/bash ./run-test.sh > test.out 2> test.err) mas01ik@355: EXIT_STATUS=$? mas01ik@355: if [ ${EXIT_STATUS} -eq 14 ]; then mas01ik@355: echo " n/a." mas01ik@355: elif [ ${EXIT_STATUS} -ne 104 ]; then mas01ik@355: echo " failed (exit status ${EXIT_STATUS})." mas01ik@355: FAILED=true mas01ik@355: else mas01ik@355: echo " success." mas01ik@355: fi mas01ik@355: else mas01ik@355: echo Skipping test ${file} mas01ik@355: fi mas01ik@355: fi mas01ik@355: done mas01ik@355: mas01ik@355: if [ -z "${FAILED}" ]; then mas01ik@355: exit 0 mas01ik@355: else mas01ik@355: exit 1 mas01ik@355: fi