6 PRIVATE_GIT="881c48805e352dfe150993814757ca974282be18"
10 while [[ $# -gt 0 ]]; do
55 if [ "$(uname)" == "Linux" ]; then
56 export LD_LIBRARY_PATH=build/src/lib:../../lib:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH
57 rm -f build/test/dcpomatic2_openssl
58 # This must be our patched openssl or tests will fail
59 if [ ! -f build/test/dcpomatic2_openssl ]; then
60 ln -s ../../../openssl/apps/openssl build/test/dcpomatic2_openssl
62 export DCPOMATIC_TEST_TOOLS_PATH=/opt/asdcplib/bin
63 if [ -f /src/backports/dcp_inspect ]; then
64 export DCPOMATIC_DCP_INSPECT=/src/backports/dcp_inspect
67 python3 -m clairmeta.cli --help > /dev/null 2>&1
68 if [ "$?" == "0" ]; then
69 export DCPOMATIC_CLAIRMETA=1
74 if [ "$(uname)" == "Darwin" ]; then
75 resources=build/Resources
78 cp fonts/*.ttf $resources
79 cp -r ../libdcp/tags $resources
80 cp -r ../libdcp/xsd $resources
81 cp ../libdcp/ratings $resources
82 rm -f build/test/openssl
83 ln -s ../../../openssl/apps/openssl build/test/openssl
84 # SIP stops this being passed in from the caller's environment
85 export DYLD_LIBRARY_PATH=$environment/x86_64/10.10/lib:$HOME/workspace/lib
86 # We need to find ffcmp in here
87 export PATH=$PATH:$HOME/workspace/bin
90 if [ "$check" == "1" ]; then
91 if [ "$DCPOMATIC_TEST_PRIVATE" == "" ]; then
92 pushd ../dcpomatic-test-private
94 pushd $DCPOMATIC_TEST_PRIVATE
96 current=$(git rev-parse HEAD)
97 if [ "$current" != "$PRIVATE_GIT" ]; then
98 echo "Unexpected dcpomatic-test-private version"
104 if [ "$type" == "debug" ]; then
105 gdb --args build/test/unit-tests --catch_system_errors=no --log_level=test_suite $*
106 elif [ "$type" == "backtrace" ]; then
107 gdb -batch -ex "run" -ex "thread apply all bt" -return-child-result --args build/test/unit-tests --catch_system_errors=yes $*
108 elif [ "$type" == "valgrind" ]; then
109 # valgrind --tool="memcheck" --vgdb=yes --vgdb-error=0 build/test/unit-tests $*
110 valgrind --tool="memcheck" --suppressions=suppressions build/test/unit-tests $*
111 elif [ "$type" == "callgrind" ]; then
112 valgrind --tool="callgrind" build/test/unit-tests $*
113 elif [ "$type" == "quiet" ]; then
114 build/test/unit-tests --catch_system_errors=no $*
115 elif [ "$type" == "drd" ]; then
116 valgrind --tool="drd" build/test/unit-tests $*
117 elif [ "$type" == "helgrind" ]; then
118 valgrind --tool="helgrind" build/test/unit-tests $*
121 build/test/unit-tests --catch_system_errors=no $*