summaryrefslogtreecommitdiff
path: root/run/tests
diff options
context:
space:
mode:
Diffstat (limited to 'run/tests')
-rwxr-xr-xrun/tests39
1 files changed, 31 insertions, 8 deletions
diff --git a/run/tests b/run/tests
index f3b43666..f4e8d405 100755
--- a/run/tests
+++ b/run/tests
@@ -10,9 +10,35 @@ work=build/test
dcpinfo=build/tools/dcpinfo
dcpverify=build/tools/dcpverify
+type=""
+while [[ $# -gt 0 ]]; do
+ case $1 in
+ -e)
+ environment=$2
+ shift
+ shift
+ ;;
+ --debug)
+ type="debug"
+ shift
+ ;;
+ --valgrind)
+ type="valgrind"
+ shift
+ ;;
+ --callgrind)
+ type="callgrind"
+ shift
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
export LD_LIBRARY_PATH=build/src:/usr/local/lib:/usr/local/lib64:$LD_LIBRARY_PATH
# 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
+export DYLD_LIBRARY_PATH=$environment/x86_64/10.10/lib:/Users/ci/workspace/lib
export LIBDCP_RESOURCES=.
# Make sure we have the required tools
@@ -23,14 +49,11 @@ done
echo "--- Unit tests"
# Run the unit tests in test/
-if [ "$1" == "--debug" ]; then
- shift
+if [ "$type" == "debug" ]; then
gdb --args $work/tests $private $*
-elif [ "$1" == "--valgrind" ]; then
- shift
+elif [ "$type" == "valgrind" ]; then
valgrind --tool="memcheck" $work/tests $private $*
-elif [ "$1" == "--callgrind" ]; then
- shift
+elif [ "$type" == "callgrind" ]; then
valgrind --tool="callgrind" $work/tests $private $*
else
$work/tests $* -- $private
@@ -150,7 +173,7 @@ fi
$dcpinfo -s $private/data/JourneyToJah_TLR-1_F_EN-DE-FR_CH_51_2K_LOK_20140225_DGL_SMPTE_OV >> $work/jah.log
# Parse some problematic subs and check that we get it right
-run/test/subs_in_out $private/TunaBoat_Icelandic_Reel1_V1_8sec.xml > $work/tuna.xml
+build/test/subs_in_out $private/TunaBoat_Icelandic_Reel1_V1_8sec.xml > $work/tuna.xml
diff -q $private/TunaBoat_Icelandic_Reel1_V1_8sec.parsed.xml $work/tuna.xml
if [ "$?" != "0" ]; then
echo "FAIL: output of parse check 1 invalid"