4 # Runs our test suite, which (amongst other things)
5 # builds a couple of DCPs.
6 # The outputs are compared against the ones
7 # in test/ref/DCP, and an error is given
8 # if anything is different.
11 if [ "$1" == "--debug" ]; then
13 LD_LIBRARY_PATH=build/src:build/asdcplib/src gdb --args build/test/tests
15 LD_LIBRARY_PATH=build/src:build/asdcplib/src build/test/tests
18 diff -ur test/ref/DCP/foo build/test/foo
19 if [ "$?" != "0" ]; then
20 echo "FAIL: files differ"
24 diff -ur test/ref/DCP/bar build/test/bar
25 if [ "$?" != "0" ]; then
26 echo "FAIL: files differ"
30 rm -f build/test/info.log
32 if [ ! -e "../libdcp-test" ]; then
33 echo "Test corpus not found"
37 for d in `find ../libdcp-test -mindepth 1 -maxdepth 1 -type d`; do
38 if [ `basename $d` != ".git" ]; then
39 LD_LIBRARY_PATH=build/src:build/asdcplib/src build/tools/dcpinfo -s $d >> build/test/info.log
40 if [ "$?" != "0" ]; then
41 echo "FAIL: dcpinfo failed for $d"
47 diff -q build/test/info.log ../libdcp-test/info.log
48 if [ "$?" != "0" ]; then
49 echo "FAIL: dcpinfo output incorrect"
53 rm -f build/test/info2.log
54 rm -rf build/test/libdcp-test
56 cp -r ../libdcp-test build/test
57 for d in `find build/test/libdcp-test -mindepth 1 -maxdepth 1 -type d`; do
58 if [ `basename $d` != ".git" ]; then
59 LD_LIBRARY_PATH=build/src:build/asdcplib/src build/test/rewrite_subs $d
60 LD_LIBRARY_PATH=build/src:build/asdcplib/src build/tools/dcpinfo -s $d >> build/test/info2.log
64 sed -i "s/DCP: build\/test/DCP: \.\./g" build/test/info2.log
66 diff -q build/test/info2.log ../libdcp-test/info.log
67 if [ "$?" != "0" ]; then
68 echo "FAIL: dcpinfo output from rewrite incorrect"