#!/bin/sh
-REL_TOP=`dirname "$0"`/..
-TOP=`realpath $REL_TOP`
+cd "`dirname \"$0\"`"
+TOP=..
. $TOP/build/gtk2_ardour/ardev_common_waf.sh
LIBS_DIR=$TOP/build/libs
+ALLGOOD=yes
+
run_tests () {
- echo ""
- echo "-------------------------------------------"
- echo "Running tests for $1..."
- echo "-------------------------------------------"
- echo ""
- cd $LIBS_DIR/$1
- $2 ./run-tests
- cd -
+ echo ""
+ echo "-------------------------------------------"
+ RUN=run-tests
+ if test -n "$2"; then
+ RUN=$2
+ echo "Running test $2 of $1..."
+ else
+ echo "Running tests for $1..."
+ fi
+ echo "-------------------------------------------"
+ echo ""
+ $3 $LIBS_DIR/$1/$RUN || ALLGOOD=no
echo ""
}
if [ $# -gt 0 ]; then
- run_tests $1 $2
+ run_tests $1 $2 $3
exit
fi
run_tests evoral
run_tests pbd
run_tests ardour
+
+if test "$ALLGOOD" != "yes"; then
+ echo ""
+ echo ""
+ echo " *** SOME TEST(s) FAILED ***"
+ echo ""
+ echo ""
+fi