X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=run-tests.sh;h=9456273a9c93c5ea2e2c408e486068091aa5baac;hb=56295f9d82c74b967b234ac89a5600d5cff1b641;hp=671da9198bb4be44c7a67424ecba3270f3fd912a;hpb=fd8a665cbb0a9a44995f88567747e2379a6f4098;p=libdcp.git diff --git a/run-tests.sh b/run-tests.sh index 671da919..9456273a 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -8,9 +8,17 @@ # if anything is different. # +if [ ! -e "../libdcp-test" ]; then + echo "Test corpus not found" + exit 1 +fi + if [ "$1" == "--debug" ]; then shift LD_LIBRARY_PATH=build/src:build/asdcplib/src gdb --args build/test/tests +elif [ "$1" == "--valgrind" ]; then + shift + LD_LIBRARY_PATH=build/src:build/asdcplib/src valgrind --tool="memcheck" build/test/tests else LD_LIBRARY_PATH=build/src:build/asdcplib/src build/test/tests fi @@ -29,12 +37,7 @@ fi rm -f build/test/info.log -if [ ! -e "../libdcp-test" ]; then - echo "Test corpus not found" - exit 1 -fi - -for d in `find ../libdcp-test -mindepth 1 -maxdepth 1 -type d`; do +for d in `find ../libdcp-test -mindepth 1 -maxdepth 1 -type d | sort`; do if [ `basename $d` != ".git" ]; then LD_LIBRARY_PATH=build/src:build/asdcplib/src build/tools/dcpinfo -s $d >> build/test/info.log if [ "$?" != "0" ]; then @@ -54,7 +57,7 @@ rm -f build/test/info2.log rm -rf build/test/libdcp-test cp -r ../libdcp-test build/test -for d in `find build/test/libdcp-test -mindepth 1 -maxdepth 1 -type d`; do +for d in `find build/test/libdcp-test -mindepth 1 -maxdepth 1 -type d | sort`; do if [ `basename $d` != ".git" ]; then LD_LIBRARY_PATH=build/src:build/asdcplib/src build/test/rewrite_subs $d LD_LIBRARY_PATH=build/src:build/asdcplib/src build/tools/dcpinfo -s $d >> build/test/info2.log @@ -68,5 +71,11 @@ if [ "$?" != "0" ]; then echo "FAIL: dcpinfo output from rewrite incorrect" exit 1 fi + +diff build/test/baz/video1.mxf build/test/baz/video2.mxf +if [ "$?" != "0" ]; then + echo "FAIL: MXFs from recovery incorrect" + exit 1 +fi echo "PASS"