Fix seek in linearly interpolated control lists.
[ardour.git] / libs / evoral / run-tests.sh
index 64c36a8fec88cc70c613b0fa527f4414657ce111..2a96c0037fd96491ebf4a4a36ab70391f7325032 100755 (executable)
@@ -1,24 +1,21 @@
 #!/bin/sh
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:../../build/default/libs/evoral
-if [ ! -f './test/testdata/TakeFive.mid' ]; then
-    echo "This script must be run from within the libs/evoral directory";
-       exit 1;
-fi
 
-srcdir=`pwd`
+SCRIPTPATH=$( cd $(dirname $0) ; pwd -P )
+TOP="$SCRIPTPATH/../.."
+LIBS_DIR="$TOP/build/libs"
 
-# Make symlink to TakeFive.mid in build directory
-cd ../../build/default/libs/evoral
-mkdir -p ./test/testdata
-ln -fs $srcdir/test/testdata/TakeFive.mid \
-       ./test/testdata/TakeFive.mid
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBS_DIR/evoral:$LIBS_DIR/pbd
 
-lcov -d ./src -z
+export EVORAL_TEST_PATH="$SCRIPTPATH/test/testdata"
+
+cd $LIBS_DIR/evoral
+
+lcov -q -d ./src -z
 ./run-tests
-lcov -d ./src -d ./test -b ../../.. -c > coverage.lcov
-lcov -r coverage.lcov *boost* *c++* *usr/include* -o coverage.lcov
+lcov -q -d ./src -d ./test -b ../../.. -c > coverage.lcov
+lcov -q -r coverage.lcov *boost* *c++* *usr/include* -o coverage.lcov
 mkdir -p ./coverage
-genhtml -o coverage coverage.lcov
+genhtml -q -o coverage coverage.lcov
 #rm -r coverage/boost
 #rm -r coverage/usr
 #rm -r coverage/c++