5 if [ "$(uname)" == "Linux" ]; then
6 export LD_LIBRARY_PATH=build/src/lib:/home/c.hetherington/lib:$LD_LIBRARY_PATH
7 rm -f build/test/openssl
8 # This must be our patched openssl or tests will fail
9 ln -s ../../../openssl/apps/openssl build/test/dcpomatic2_openssl
12 if [ "$1" == "--debug" ]; then
14 gdb --args build/test/unit-tests --catch_system_errors=no --log_level=test_suite $*
15 elif [ "$1" == "--backtrace" ]; then
17 gdb -batch -ex "run" -ex "thread apply all bt" -return-child-result --args build/test/unit-tests --catch_system_errors=yes $*
18 elif [ "$1" == "--valgrind" ]; then
20 # valgrind --tool="memcheck" --vgdb=yes --vgdb-error=0 build/test/unit-tests $*
21 valgrind --tool="memcheck" --suppressions=suppressions build/test/unit-tests $*
22 elif [ "$1" == "--callgrind" ]; then
24 valgrind --tool="callgrind" build/test/unit-tests $*
25 elif [ "$1" == "--quiet" ]; then
27 build/test/unit-tests --catch_system_errors=no $*
28 elif [ "$1" == "--drd" ]; then
30 valgrind --tool="drd" build/test/unit-tests $*
31 elif [ "$1" == "--helgrind" ]; then
33 valgrind --tool="helgrind" build/test/unit-tests $*
36 build/test/unit-tests --catch_system_errors=no --log_level=test_suite $*
37 # build/test/unit-tests --catch_system_errors=no $*