From 85bac66bc83c5f1e7e7ec074ee094d2423866171 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Mon, 9 Sep 2002 18:03:26 +0000 Subject: [PATCH] Fixes for make distcheck. --- t/Makefile.am | 7 ++++--- t/test_gom | 19 ++++++++++++------- t/test_script | 12 ++++++++---- 3 files changed, 24 insertions(+), 14 deletions(-) diff --git a/t/Makefile.am b/t/Makefile.am index 626019e..aa8f237 100644 --- a/t/Makefile.am +++ b/t/Makefile.am @@ -22,14 +22,15 @@ gomtest_LDFLAGS = -L ../gedcom/.libs -L ../gom/.libs -lgedcom_gom -lgedcom gomtest_static_SOURCES = gomtest.c gomtest_static_LDADD = ../gedcom/.libs/libgedcom.a ../gom/.libs/libgedcom_gom.a +DMALLOC_LOG = dmalloc.log -TEST_SCRIPT=test_script test_gom test_gom_static +TEST_SCRIPT=test_script test_gom TESTS := $(wildcard $(srcdir)/*.test) EXTRA_DIST=$(TEST_SCRIPT) $(TESTS) all-local: - @rm -f testgedcom.out dmalloc.log + @rm -f testgedcom.out $(DMALLOC_LOG) check-% : %.test all-local @srcdir=$(srcdir); export srcdir; \ @@ -45,7 +46,7 @@ check-dmalloc-%: %.test all-local exit; \ fi; \ srcdir=$(srcdir); export srcdir; \ - GOM_DMALLOC_TEST=1; export GOM_DMALLOC_TEST; \ + GOM_DMALLOC_TEST=$(DMALLOC_LOG); export GOM_DMALLOC_TEST; \ if $(TESTS_ENVIRONMENT) ./$<; then \ echo "Test succeeded"; \ else \ diff --git a/t/test_gom b/t/test_gom index dd0d096..9c0b0ce 100755 --- a/t/test_gom +++ b/t/test_gom @@ -5,6 +5,7 @@ options="-q" extra_options= dmalloc=`which dmalloc` +dmalloc_tmp=dmalloc.env while [ $# -gt 0 ] do @@ -29,26 +30,30 @@ then srcdir=. options=$extra_options else - testfile=input/$file + testfile=$srcdir/input/$file options="$options $extra_options" fi builddir=`pwd` -export GCONV_PATH=../ansel:$GCONV_PATH +export GCONV_PATH=.:$GCONV_PATH export LD_LIBRARY_PATH=$builddir/../gedcom/.libs:$builddir/../gom/.libs:$LD_LIBRARY_PATH -cp $builddir/../ansel/.libs/ANSI_Z39.47.so ../ansel +ln -s $srcdir/../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 $builddir/gomtest $options $testfile else - $dmalloc -b -l dmalloc.log -i 100 low > dmalloc.env - . dmalloc.env - rm dmalloc.env + $dmalloc -b -l $GOM_DMALLOC_TEST -i 100 low > $dmalloc_tmp + . $dmalloc_tmp + rm $dmalloc_tmp $builddir/gomtest_static $options $testfile fi result=$? -rm ../ansel/ANSI_Z39.47.so +rm gedcom.enc +rm ANSI_Z39.47.so +rm gconv-modules if [ "$result" -eq "$expected_result" -a ! -r core ] then exit 0 diff --git a/t/test_script b/t/test_script index f8f3652..0623403 100755 --- a/t/test_script +++ b/t/test_script @@ -28,18 +28,22 @@ then srcdir=. options=$extra_options else - testfile=input/$file + testfile=$srcdir/input/$file options="$options $extra_options" fi builddir=`pwd` -export GCONV_PATH=../ansel:$GCONV_PATH +export GCONV_PATH=.:$GCONV_PATH export LD_LIBRARY_PATH=$builddir/../gedcom/.libs:$LD_LIBRARY_PATH -cp $builddir/../ansel/.libs/ANSI_Z39.47.so ../ansel +ln -s $srcdir/../gedcom.enc . +ln -s $builddir/../ansel/.libs/ANSI_Z39.47.so . +ln -s $srcdir/../ansel/gconv-modules . rm -f core $builddir/testgedcom $options $testfile result=$? -rm ../ansel/ANSI_Z39.47.so +rm gedcom.enc +rm ANSI_Z39.47.so +rm gconv-modules if [ "$result" -eq "$expected_result" -a ! -r core ] then exit 0 -- 2.30.2