summaryrefslogtreecommitdiff
path: root/run-tests.sh
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-02-26 15:43:53 +0000
committerCarl Hetherington <cth@carlh.net>2014-02-26 15:43:53 +0000
commitf3fba4af9566ae02f44dfa660c71dbaef6f4f92b (patch)
tree4b55c96e9101cee3c2b1f9dd854fad8c68a4383b /run-tests.sh
parent583999819d97ae98e97997ed7d6ccde9abc13e9b (diff)
Clean up unit testing.
Diffstat (limited to 'run-tests.sh')
-rwxr-xr-xrun-tests.sh81
1 files changed, 0 insertions, 81 deletions
diff --git a/run-tests.sh b/run-tests.sh
deleted file mode 100755
index fc56b247..00000000
--- a/run-tests.sh
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/bash -e
-
-#
-# Runs our test suite, which (amongst other things)
-# builds a couple of DCPs.
-# The outputs are compared against the ones
-# in test/ref/DCP, and an error is given
-# 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
-
-diff -ur test/ref/DCP/foo build/test/foo
-if [ "$?" != "0" ]; then
- echo "FAIL: files differ"
- exit 1
-fi
-
-diff -ur test/ref/DCP/bar build/test/bar
-if [ "$?" != "0" ]; then
- echo "FAIL: files differ"
- exit 1
-fi
-
-rm -f build/test/info.log
-
-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
- 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 | 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
- fi
-done
-
-sed -i "s/DCP: build\/test/DCP: \.\./g" build/test/info2.log
-
-diff -q build/test/info2.log ../libdcp-test/info.log
-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"