summaryrefslogtreecommitdiff
path: root/run-tests.sh
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-12-22 23:29:50 +0000
committerCarl Hetherington <cth@carlh.net>2012-12-22 23:29:50 +0000
commitf5cc57f11946e1e269df25db434c5f8efe953a68 (patch)
tree47e7348bbf8d5077dec505c926af0d631c158b2b /run-tests.sh
parent4707ffd992e01a42e978b90b2cdcfc50d36e1513 (diff)
More various fixes to subtitle XML writing.
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-xrun-tests.sh39
1 files changed, 28 insertions, 11 deletions
diff --git a/run-tests.sh b/run-tests.sh
index e02589b6..b6064db3 100755
--- a/run-tests.sh
+++ b/run-tests.sh
@@ -21,25 +21,42 @@ fi
rm -f build/test/info.log
-if [ -e "../libdcp-test" ]; then
- for d in `find ../libdcp-test -mindepth 1 -maxdepth 1 -type d`; 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
- echo "FAIL: dcpinfo failed for $d"
- exit 1
- fi
- fi
- done
-else
+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
+ 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
+ echo "FAIL: dcpinfo failed for $d"
+ exit 1
+ fi
+ fi
+done
+
diff -q build/test/info.log ../libdcp-test/info.log
if [ "$?" != "0" ]; then
echo "FAIL: dcpinfo output incorrect"
exit 1
fi
+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
+ 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
+ fi
+done
+
+diff -q build/test/info2.log ../libdcp-test/info.log
+if [ "$?" != "0" ]; then
+ echo "FAIL: dcpinfo output from rewrite incorrect"
+ exit 1
+fi
+
echo "PASS"