diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-11 10:57:21 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-11 10:57:21 -0400 |
commit | 7a5118f403506a6af2b586478ea4a7bdfb05ead4 (patch) | |
tree | 6439d4d2b9e188ca448c999606d859632e8e9cec /libs/ardour/run-tests.sh | |
parent | 83a92a0ea1e0eb60aacc5dc0a410d62b3c3eafd9 (diff) |
Add --single-tests option to also build each libardour test as a separate program
Diffstat (limited to 'libs/ardour/run-tests.sh')
-rwxr-xr-x | libs/ardour/run-tests.sh | 52 |
1 files changed, 27 insertions, 25 deletions
diff --git a/libs/ardour/run-tests.sh b/libs/ardour/run-tests.sh index b31751991c..fc7d68a8a5 100755 --- a/libs/ardour/run-tests.sh +++ b/libs/ardour/run-tests.sh @@ -3,30 +3,32 @@ # Run libardour test suite. # -if [ ! -f './tempo.cc' ]; then - echo "This script must be run from within the libs/ardour directory"; - exit 1; -fi - -cd ../.. -top=`pwd` -cd build - -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/appleutility:$libs/taglib:$libs/evoral:$libs/evoral/src/libsmf:$libs/timecode:$libs/libltc:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH - -export ARDOUR_CONFIG_PATH=$top:$top/gtk2_ardour:$libs/..:$libs/../gtk2_ardour -export ARDOUR_PANNER_PATH=$libs/panners/2in2out:$libs/panners/1in2out:$libs/panners/vbap -export ARDOUR_SURFACES_PATH=$libs/surfaces/osc:$libs/surfaces/generic_midi:$libs/surfaces/tranzport:$libs/surfaces/powermate:$libs/surfaces/mackie -export ARDOUR_MCP_PATH="../mcp" -export ARDOUR_DLL_PATH=$libs -export ARDOUR_DATA_PATH=$top/gtk2_ardour:$top/build/gtk2_ardour:. - -if [ "$1" == "--debug" ]; then - gdb ./libs/ardour/run-tests -elif [ "$1" == "--valgrind" ]; then - valgrind ./libs/ardour/run-tests +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 - ./libs/ardour/run-tests $* + 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 + |