From 9e794af3eaa3f4f0bee6c5b900430af8b49633b8 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Tue, 6 Dec 2016 12:51:49 +1000 Subject: Add script to run audiographer tests --- libs/audiographer/run-tests.sh | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 libs/audiographer/run-tests.sh diff --git a/libs/audiographer/run-tests.sh b/libs/audiographer/run-tests.sh new file mode 100755 index 0000000000..6fe4cb5ad7 --- /dev/null +++ b/libs/audiographer/run-tests.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Run audiographer test suite. +# + +TOP=`dirname "$0"`/../.. +. $TOP/build/gtk2_ardour/ardev_common_waf.sh +LIB_BUILD_DIR=$TOP/build/libs/audiographer + +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 $LIB_BUILD_DIR -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 $LIB_BUILD_DIR/run-tests + elif [ "$1" == "--valgrind" ]; then + valgrind $LIB_BUILD_DIR/run-tests + else + $LIB_BUILD_DIR/run-tests $* + fi +fi + -- cgit v1.2.3