X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Frun-tests.sh;h=e894fecb63d145e5b0ab607958375258baf8f311;hb=f6d29abfc75c460b9e35717f2907e4e61bf38058;hp=38be6c589135a86b9a5ee36e826358f4da0fdca2;hpb=405def9215a2fc7b70dd2999a06d16e704ddd058;p=ardour.git diff --git a/libs/ardour/run-tests.sh b/libs/ardour/run-tests.sh index 38be6c5891..e894fecb63 100755 --- a/libs/ardour/run-tests.sh +++ b/libs/ardour/run-tests.sh @@ -1,17 +1,35 @@ -#!/bin/sh +#!/bin/bash +# +# Run libardour test suite. +# +. test-env.sh -if [ ! -f './tempo.cc' ]; then - echo "This script must be run from within the libs/ardour directory"; - exit 1; +if [ "$1" == "--single" ] || [ "$2" == "--single" ]; then + if [ "$1" == "--single" ]; then + TESTS="test_*$2*" + elif [ "$2" == "--single" ]; then + TESTS="test_*$3*" + else + TESTS='test_*' + fi + for test_program in `find libs/ardour -name "$TESTS" -type f -perm /u+x`; + do + echo "Running $test_program..." + if [ "$1" == "--debug" ]; then + gdb ./"$test_program" + elif [ "$1" == "--valgrind" ]; then + valgrind ./"$test_program" + else + ./"$test_program" + fi + done +else + if [ "$1" == "--debug" ]; then + gdb ./libs/ardour/run-tests + elif [ "$1" == "--valgrind" ]; then + valgrind ./libs/ardour/run-tests + else + ./libs/ardour/run-tests $* + fi fi -srcdir=`pwd` -cd ../../build/default - -libs='libs' - -export LD_LIBRARY_PATH=$libs/audiographer:$libs/vamp-sdk:$libs/surfaces:$libs/surfaces/control_protocol:$libs/ardour:$libs/midi++2:$libs/pbd:$libs/rubberband:$libs/soundtouch:$libs/gtkmm2ext:$libs/sigc++2:$libs/glibmm2:$libs/gtkmm2/atk:$libs/gtkmm2/pango:$libs/gtkmm2/gdk:$libs/gtkmm2/gtk:$libs/libgnomecanvasmm:$libs/libsndfile:$libs/appleutility:$libs/cairomm:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$LD_LIBRARY_PATH - -echo LD_LIBRARY_PATH = $LD_LIBRARY_PATH - -./libs/ardour/run-tests