6 PRIVATE_GIT="0af96c8d8f28e71b8b1a19e3ea5637fcba5e913e"
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"
51 ./check_sums || (echo "dcpomatic-test-private checksums are incorrect"; exit 1)
55 if [ "$1" == "--debug" ]; then
57 gdb --args build/test/unit-tests --catch_system_errors=no --log_level=test_suite $*
58 elif [ "$1" == "--backtrace" ]; then
60 gdb -batch -ex "run" -ex "thread apply all bt" -return-child-result --args build/test/unit-tests --catch_system_errors=yes $*
61 elif [ "$1" == "--valgrind" ]; then
63 # valgrind --tool="memcheck" --vgdb=yes --vgdb-error=0 build/test/unit-tests $*
64 valgrind --tool="memcheck" --suppressions=suppressions build/test/unit-tests $*
65 elif [ "$1" == "--callgrind" ]; then
67 valgrind --tool="callgrind" build/test/unit-tests $*
68 elif [ "$1" == "--quiet" ]; then
70 build/test/unit-tests --catch_system_errors=no $*
71 elif [ "$1" == "--drd" ]; then
73 valgrind --tool="drd" build/test/unit-tests $*
74 elif [ "$1" == "--helgrind" ]; then
76 valgrind --tool="helgrind" build/test/unit-tests $*
79 build/test/unit-tests --catch_system_errors=no $*