X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=run%2Ftests;h=1dfd64f4ad98b443e83ca2ca00e84d704afede2c;hb=8dfe86431424fa6c43a0ff3ca092989d21a47dbf;hp=d6a3ba15f2e4f91b63fb7078e80501875def6fb4;hpb=0c1025064c77026aa8c733746092cb042030fdc7;p=dcpomatic.git diff --git a/run/tests b/run/tests index d6a3ba15f..1dfd64f4a 100755 --- a/run/tests +++ b/run/tests @@ -2,11 +2,34 @@ # # e.g. --run_tests=foo -export LD_LIBRARY_PATH=build/src/lib:/home/c.hetherington/lib:$LD_LIBRARY_PATH -export DCPOMATIC_LINUX_SHARE_PREFIX=`pwd` +if [ "$(uname)" == "Linux" ]; then + export LD_LIBRARY_PATH=build/src/lib:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH + rm -f build/test/dcpomatic2_openssl + # This must be our patched openssl or tests will fail + if [ ! -f build/test/dcpomatic2_openssl ]; then + ln -s ../../../openssl/apps/openssl build/test/dcpomatic2_openssl + fi +fi + +if [ "$(uname)" == "Darwin" ]; then + resources=build/Resources + rm -rf $resources + mkdir -p $resources + cp fonts/*.ttf $resources + cp -r ../libdcp/tags $resources + cp -r ../libdcp/xsd $resources + cp ../libdcp/ratings $resources + rm -f build/test/openssl + ln -s ../../../openssl/apps/openssl build/test/openssl + # SIP stops this being passed in from the caller's environment + export DYLD_LIBRARY_PATH=/Users/ci/osx-environment/x86_64/10.10/lib:/Users/ci/workspace/lib + # We need to find ffcmp in here + export PATH=$PATH:/Users/ci/workspace/bin +fi + if [ "$1" == "--debug" ]; then shift; - gdb --args build/test/unit-tests --catch_system_errors=no --log-level=test_suite $* + gdb --args build/test/unit-tests --catch_system_errors=no --log_level=test_suite $* elif [ "$1" == "--backtrace" ]; then shift; gdb -batch -ex "run" -ex "thread apply all bt" -return-child-result --args build/test/unit-tests --catch_system_errors=yes $*