6 PRIVATE_GIT="5298360d6bbae434fb4625fda1cc9dd6be101df3"
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
22 export DCPOMATIC_TEST_TOOLS_PATH=/opt/asdcplib/bin
23 if [ -f /src/backports/dcp_inspect ]; then
24 export DCPOMATIC_DCP_INSPECT=/src/backports/dcp_inspect
27 python3 -m clairmeta.cli --help > /dev/null 2>&1
28 if [ "$?" == "0" ]; then
29 export DCPOMATIC_CLAIRMETA=1
34 if [ "$(uname)" == "Darwin" ]; then
35 resources=build/Resources
38 cp fonts/*.ttf $resources
39 cp -r ../libdcp/tags $resources
40 cp -r ../libdcp/xsd $resources
41 cp ../libdcp/ratings $resources
42 rm -f build/test/openssl
43 ln -s ../../../openssl/apps/openssl build/test/openssl
44 # SIP stops this being passed in from the caller's environment
45 export DYLD_LIBRARY_PATH=/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib
46 # We need to find ffcmp in here
47 export PATH=$PATH:/Users/ci/workspace/bin
50 if [ "$check" == "1" ]; then
51 if [ "$DCPOMATIC_TEST_PRIVATE" == "" ]; then
52 pushd ../dcpomatic-test-private
54 pushd $DCPOMATIC_TEST_PRIVATE
56 current=$(git rev-parse HEAD)
57 if [ "$current" != "$PRIVATE_GIT" ]; then
58 echo "Unexpected dcpomatic-test-private version"
64 if [ "$1" == "--debug" ]; then
66 gdb --args build/test/unit-tests --catch_system_errors=no --log_level=test_suite $*
67 elif [ "$1" == "--backtrace" ]; then
69 gdb -batch -ex "run" -ex "thread apply all bt" -return-child-result --args build/test/unit-tests --catch_system_errors=yes $*
70 elif [ "$1" == "--valgrind" ]; then
72 # valgrind --tool="memcheck" --vgdb=yes --vgdb-error=0 build/test/unit-tests $*
73 valgrind --tool="memcheck" --suppressions=suppressions build/test/unit-tests $*
74 elif [ "$1" == "--callgrind" ]; then
76 valgrind --tool="callgrind" build/test/unit-tests $*
77 elif [ "$1" == "--quiet" ]; then
79 build/test/unit-tests --catch_system_errors=no $*
80 elif [ "$1" == "--drd" ]; then
82 valgrind --tool="drd" build/test/unit-tests $*
83 elif [ "$1" == "--helgrind" ]; then
85 valgrind --tool="helgrind" build/test/unit-tests $*
88 build/test/unit-tests --catch_system_errors=no $*