Fix possible ringbuffer overflow
[ardour.git] / gtk2_ardour / artest
index d461e17ebabba228d4a90a6f0b9ce5262c2914f2..24d07785bc9697d163649d3d0e78abb39251f210 100755 (executable)
@@ -1,17 +1,21 @@
 #!/bin/sh
 
-TOP=`dirname "$0"`/..
+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 ""
-  $2 $LIBS_DIR/$1/run-tests
+  $2 $LIBS_DIR/$1/run-tests || ALLGOOD=no
   echo ""
 }
 
@@ -25,3 +29,11 @@ run_tests midi++2
 run_tests evoral
 run_tests pbd
 run_tests ardour
+
+if test "$ALLGOOD" != "yes"; then
+       echo ""
+       echo ""
+       echo " *** SOME TEST(s) FAILED ***"
+       echo ""
+       echo ""
+fi