6 PRIVATE_GIT="49276da301a937fbf09bc9e7b5a537cdee72bc46"
8 if [ "$1" == "--check" ]; then
15 if [ "$(uname)" == "Linux" ]; then
16 export LD_LIBRARY_PATH=build/src/lib:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH
17 rm -f build/test/dcpomatic2_openssl
18 # This must be our patched openssl or tests will fail
19 if [ ! -f build/test/dcpomatic2_openssl ]; then
20 ln -s ../../../openssl/apps/openssl build/test/dcpomatic2_openssl
24 if [ "$(uname)" == "Darwin" ]; then
25 resources=build/Resources
28 cp fonts/*.ttf $resources
29 cp -r ../libdcp/tags $resources
30 cp -r ../libdcp/xsd $resources
31 cp ../libdcp/ratings $resources
32 rm -f build/test/openssl
33 ln -s ../../../openssl/apps/openssl build/test/openssl
34 # SIP stops this being passed in from the caller's environment
35 export DYLD_LIBRARY_PATH=/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib
36 # We need to find ffcmp in here
37 export PATH=$PATH:/Users/ci/workspace/bin
40 if [ "$check" == "1" ]; then
41 if [ "$DCPOMATIC_TEST_PRIVATE" == "" ]; then
42 pushd ../dcpomatic-test-private
44 pushd $DCPOMATIC_TEST_PRIVATE
46 current=$(git rev-parse HEAD)
47 if [ "$current" != "$PRIVATE_GIT" ]; then
48 echo "Unexpected dcpomatic-test-private version"
54 if [ "$1" == "--debug" ]; then
56 gdb --args build/test/unit-tests --catch_system_errors=no --log_level=test_suite $*
57 elif [ "$1" == "--backtrace" ]; then
59 gdb -batch -ex "run" -ex "thread apply all bt" -return-child-result --args build/test/unit-tests --catch_system_errors=yes $*
60 elif [ "$1" == "--valgrind" ]; then
62 # valgrind --tool="memcheck" --vgdb=yes --vgdb-error=0 build/test/unit-tests $*
63 valgrind --tool="memcheck" --suppressions=suppressions build/test/unit-tests $*
64 elif [ "$1" == "--callgrind" ]; then
66 valgrind --tool="callgrind" build/test/unit-tests $*
67 elif [ "$1" == "--quiet" ]; then
69 build/test/unit-tests --catch_system_errors=no $*
70 elif [ "$1" == "--drd" ]; then
72 valgrind --tool="drd" build/test/unit-tests $*
73 elif [ "$1" == "--helgrind" ]; then
75 valgrind --tool="helgrind" build/test/unit-tests $*
78 build/test/unit-tests --catch_system_errors=no $*