6 PRIVATE_GIT="a462680c7c6df8a84f9ee0bb7b4fb90055b96ca8"
8 if [ "$(uname)" == "Linux" ]; then
9 export LD_LIBRARY_PATH=build/src/lib:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH
10 rm -f build/test/dcpomatic2_openssl
11 # This must be our patched openssl or tests will fail
12 if [ ! -f build/test/dcpomatic2_openssl ]; then
13 ln -s ../../../openssl/apps/openssl build/test/dcpomatic2_openssl
17 if [ "$(uname)" == "Darwin" ]; then
18 resources=build/Resources
21 cp fonts/*.ttf $resources
22 cp -r ../libdcp/tags $resources
23 cp -r ../libdcp/xsd $resources
24 cp ../libdcp/ratings $resources
25 rm -f build/test/openssl
26 ln -s ../../../openssl/apps/openssl build/test/openssl
27 # SIP stops this being passed in from the caller's environment
28 export DYLD_LIBRARY_PATH=/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib
29 # We need to find ffcmp in here
30 export PATH=$PATH:/Users/ci/workspace/bin
33 pushd ../dcpomatic-test-private
34 current=$(git rev-parse HEAD)
35 if [ "$current" != "$PRIVATE_GIT" ]; then
36 echo "Unexpected dcpomatic-test-private version"
39 ./check_sums || (echo "dcpomatic-test-private checksums are incorrect"; exit 1)
42 if [ "$1" == "--debug" ]; then
44 gdb --args build/test/unit-tests --catch_system_errors=no --log_level=test_suite $*
45 elif [ "$1" == "--backtrace" ]; then
47 gdb -batch -ex "run" -ex "thread apply all bt" -return-child-result --args build/test/unit-tests --catch_system_errors=yes $*
48 elif [ "$1" == "--valgrind" ]; then
50 # valgrind --tool="memcheck" --vgdb=yes --vgdb-error=0 build/test/unit-tests $*
51 valgrind --tool="memcheck" --suppressions=suppressions build/test/unit-tests $*
52 elif [ "$1" == "--callgrind" ]; then
54 valgrind --tool="callgrind" build/test/unit-tests $*
55 elif [ "$1" == "--quiet" ]; then
57 build/test/unit-tests --catch_system_errors=no $*
58 elif [ "$1" == "--drd" ]; then
60 valgrind --tool="drd" build/test/unit-tests $*
61 elif [ "$1" == "--helgrind" ]; then
63 valgrind --tool="helgrind" build/test/unit-tests $*
66 build/test/unit-tests --catch_system_errors=no $*