X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=run-tests.sh;h=8873a3e96bc1189fee5d39008902c74883dfaa06;hb=3541f4c9bd91169e55a82b9fa46767b46ca06188;hp=a44ccea09ea9dbc1b321719c3e02ba4f45986aa5;hpb=eaac013b4e68dea48fb2c3070b7c7ca59dfd1b96;p=libdcp.git diff --git a/run-tests.sh b/run-tests.sh index a44ccea0..8873a3e9 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -1,6 +1,21 @@ -#!/bin/sh +#!/bin/bash -LD_LIBRARY_PATH=build/src:build/asdcplib/src -build/test/tests -#diff -ur build/test/foo test/ref/DCP - \ No newline at end of file +# +# Runs our test suite, which builds a DCP. +# The output is compared against the one +# in test/ref/DCP, and an error is given +# if anything is different. +# + +if [ "$1" == "--debug" ]; then + shift + LD_LIBRARY_PATH=build/src:build/asdcplib/src gdb --args build/test/tests +else + LD_LIBRARY_PATH=build/src:build/asdcplib/src build/test/tests +fi +diff -ur test/ref/DCP build/test/foo +if [ "$?" != "0" ]; then + echo "FAIL: files differ" + exit 1 +fi +echo "PASS" \ No newline at end of file