#!/bin/sh TESTS="array.test map.test rb.test log.test blackbox-segfault.sh loop.test ipc.test" TESTDIR=/usr/lib64/libqb/tests TESTS_RUN=0 TESTS_FAILED=0 export PATH=$TESTDIR:$PATH for i in ${TESTS} do echo echo "---- running $i" # Cope with non-executable scripts if [ -z "`echo $i|grep \\.sh`" ] then ${TESTDIR}/${i} else sh ${TESTDIR}/${i} fi # Did it succeed? if [ $? != 0 ] then TESTS_FAILED=$((TESTS_FAILED + 1)) echo "FAILED: $i" fi TESTS_RUN=$((TESTS_RUN + 1)) done echo echo "Tests run: $TESTS_RUN" echo "Tests failed: $TESTS_FAILED" if [ $TESTS_FAILED -gt 0 ] then exit 1 else exit 0 fi