Commit d5e99db2 authored by Michel Lespinasse's avatar Michel Lespinasse

added support for "make check" and "make distcheck"

parent 0d4a3226
SUBDIRS = autotools include test doc libmpeg2 libvo src
SUBDIRS = autotools include doc libmpeg2 libvo src test
EXTRA_DIST = bootstrap
EXTRA_DIST = regression tests tek-525 tek-625
TESTS = regression
if [ $# -ge 1 ]; then testfile=$1; fi
if test x"$srcdir" != x""; then
builddir="." # running from make check, but it does not define that
srcdir=`echo "$0" | sed s,[^/]*$,,`
test "$srcdir" = "$0" && srcdir=.
test -z "$srcdir" && srcdir=.
builddir="$srcdir" # running manually, have to assume
srcdir=`cd $srcdir;pwd`
builddir=`cd $builddir;pwd`
if [ $# -ge 1 ]; then testfile="$1"; fi
dirs=`awk -F '#' '{print $1}' $testfile`
basedir=`head -n 1 $testfile | awk '{print $2}'`
cd $srcdir; if [ ! -d $basedir ]; then
cd ..; if [ ! -d $basedir ]; then exit 77; fi # for make distcheck
basedir=`cd $basedir;pwd`
dirs=`awk -F '#' '{print $1}' $testfile`
# choose between c_md5 and mmx_md5 (based on the idct you use)
if [ $# -ge 2 -a x"$2" != x"c" ]; then md5="$2.md5"; accel=""; fi
cd $builddir
rm -fr data
mkdir data
cd data
......@@ -19,9 +38,11 @@ cd data
for dir in $dirs; do
echo $dir
../../src/mpeg2dec $accel -o md5 $basedir/$dir/stream >/dev/null 2>&1 >md5
diff -u md5 $basedir/$dir/$md5
diff -u md5 $basedir/$dir/$md5 || error=1
rm -f md5 core
cd ..
rmdir data
exit $error
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment