X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Frun-profiling.sh;h=541c7254ceab31790d74e45ef0c928de6a14ba75;hb=7fc3b0c34c552d7be862897bd0aaa542453e9973;hp=e88ca2cf8622442d4cb7cadf7625edcda59e275e;hpb=62304d57c6a9206d3a98ef12885596e5872c3f08;p=ardour.git diff --git a/libs/ardour/run-profiling.sh b/libs/ardour/run-profiling.sh index e88ca2cf86..541c7254ce 100644 --- a/libs/ardour/run-profiling.sh +++ b/libs/ardour/run-profiling.sh @@ -3,28 +3,30 @@ # Run libardour profiling tests. # -if [ ! -f './tempo.cc' ]; then - echo "This script must be run from within the libs/ardour directory"; - exit 1; +if [ "$1" == "" ]; then + echo "Syntax: run-profiling.sh [flag] []" + exit 1; fi -srcdir=`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:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH - -export ARDOUR_PANNER_PATH=$libs/panners/2in2out:$libs/panners/1in2out:$libs/panners/vbap +. test-env.sh export LD_PRELOAD=/home/carl/src/libfakejack/libjack.so +# session='32tracks' + +p=$1 +if [ "$p" == "--debug" -o "$p" == "--valgrind" -o "$p" == "--callgrind" ]; then + f=$p + p=$2 + shift 1 +fi +shift 1 -if [ "$1" == "--debug" ]; then - gdb ./libs/ardour/run-profiling -elif [ "$1" == "--valgrind" ]; then - valgrind ./libs/ardour/run-profiling -elif [ "$1" == "--callgrind" ]; then - valgrind --tool=callgrind ./libs/ardour/run-profiling +if [ "$f" == "--debug" ]; then + gdb --args ./libs/ardour/$p $* +elif [ "$f" == "--valgrind" ]; then + valgrind ./libs/ardour/$p $* +elif [ "$f" == "--callgrind" ]; then + valgrind --tool=callgrind ./libs/ardour/$p $* else - ./libs/ardour/run-profiling $* + ./libs/ardour/$p $* fi