X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2Fsrc%2Ftest_gom;h=90d859c14f3cf1d0acd0ff7f6800158a293b5b41;hb=ea81accae13a4617cc46f5256dad50e2732cc206;hp=fdb849f03932e8e30d81bd1c599b4ed5179a0a92;hpb=40b99549ec69cb65fc3b979c6383bed5b88af7f4;p=gedcom-parse.git diff --git a/t/src/test_gom b/t/src/test_gom index fdb849f..90d859c 100755 --- a/t/src/test_gom +++ b/t/src/test_gom @@ -2,61 +2,28 @@ # $Id$ # $Name$ -options="-q" -extra_options= -dmalloc=`which dmalloc` -dmalloc_tmp=dmalloc.env +builddir=`pwd` +if [ -z "$srcdir" ] +then + srcdir=. +fi -while [ $# -gt 0 ] -do - case "$1" in - -*) extra_options="$extra_options $1";; - *) break;; - esac - shift -done +. $srcdir/src/test_prologue.sh file=$1 -expected_result=$2 -if [ -z "$expected_result" ] -then - expected_result=0 -fi -# For use outside Makefile if [ -z "$srcdir" ] then testfile=$file - srcdir=. - options=$extra_options else - testfile=$srcdir/input/$file - options="$options $extra_options" + case $file in + ./*) testfile=$file ;; + *) testfile=$srcdir/input/$file ;; + esac fi -builddir=`pwd` -export GCONV_PATH=.:$GCONV_PATH -export LD_LIBRARY_PATH=$builddir/../gedcom/.libs:$builddir/../gom/.libs:$LD_LIBRARY_PATH -ln -s $srcdir/../data/gedcom.enc . -ln -s $builddir/../ansel/.libs/ANSI_Z39.47.so . -ln -s $srcdir/../ansel/gconv-modules . -rm -f core -if [ "$GOM_DMALLOC_TEST" = "" ] -then - $GEDCOM_TESTENV $builddir/src/gomtest $options $testfile -else - $dmalloc -b -l $GOM_DMALLOC_TEST -i 100 low > $dmalloc_tmp - . $dmalloc_tmp - rm $dmalloc_tmp - $GEDCOM_TESTENV $builddir/src/gomtest_static $options $testfile -fi -result=$? -rm gedcom.enc -rm ANSI_Z39.47.so -rm gconv-modules -if [ "$result" -eq "$expected_result" -a ! -r core ] -then - exit 0 -else - exit 1 -fi +test_program=gomtest +test_libs="$builddir/../gedcom/libgedcom.la $builddir/../gom/libgedcom_gom.la" +test_args=$testfile + +. $srcdir/src/test_bulk.sh