7 dmalloc=`which dmalloc`
8 dmalloc_tmp=dmalloc.env
13 -*) extra_options="$extra_options $1";;
22 if [ -z "$test_name" ]
26 if [ -z "$expected_result" ]
31 # For use outside Makefile
36 options=$extra_options
38 testfile=$srcdir/input/$file
39 options="$options $extra_options"
42 outfile=$test_name.out
44 reffile=$srcdir/output/$test_name.ref
45 options="$options -o $outfile"
48 ltcmd="$builddir/../libtool --mode=execute -dlopen $builddir/../gedcom/libgedcom.la -dlopen $builddir/../gom/libgedcom_gom.la"
49 GCONV_PATH=.:$GCONV_PATH
51 ln -s $srcdir/../data/gedcom.enc .
52 ln -s $builddir/../iconv/glibc/.libs/ANSI_Z39.47.so .
53 ln -s $srcdir/../iconv/glibc/gconv-modules .
55 echo "======================================================">> $logfile
56 echo "Performing test '$test_name'" >> $logfile
57 if [ "$GOM_DMALLOC_TEST" = "" ]
59 $ltcmd $GEDCOM_TESTENV $builddir/src/gomtest $options $testfile
61 $dmalloc -b -l $GOM_DMALLOC_TEST -i 100 low > $dmalloc_tmp
64 $ltcmd $GEDCOM_TESTENV $builddir/src/gomtest_static $options $testfile
71 echo "Result is $result (expected: $expected_result)" >> $logfile
72 if [ "$result" -ne "$expected_result" ]
78 echo "Core file generated!" >> $logfile
81 if diff $outfile $reffile >/dev/null 2>>$logfile
83 echo "Output agrees with reference output" >> $logfile
87 echo "Differences with reference output detected!" >> $logfile