X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2FMakefile.am;h=626019e8cfbd36496694cf4f857474702dd57b7f;hb=7ea4ef8cae7b52f2bf66371a5e7b493cbd12900e;hp=e8ebd646ae2fd282cce105f9b94674234d8c9a8e;hpb=15b7fc321087729ec9665b654f308a17b45dea8e;p=gedcom-parse.git diff --git a/t/Makefile.am b/t/Makefile.am index e8ebd64..626019e 100644 --- a/t/Makefile.am +++ b/t/Makefile.am @@ -2,17 +2,53 @@ # $Id$ # $Name$ -TEST_SCRIPT=test_script - -TESTS_ENVIRONMENT=$(srcdir)/$(TEST_SCRIPT) -TESTS = allged.ged \ - ansel.ged \ - uhlbomcl.ged \ - uhlcl.ged \ - ulhbomcl.ged \ - ulhc.ged \ - ulhcl.ged \ - ulhl.ged \ - ulhlc.ged +SUBDIRS=input +INCLUDES = -DPKGDATADIR=\"$(pkgdatadir)\" -I $(srcdir)/../include +CFLAGS = -g -O2 + +noinst_PROGRAMS = testgedcom pathtest gomtest @EXTRA_PROGS@ +EXTRA_PROGRAMS = gomtest_static + +testgedcom_SOURCES = standalone.c utf8-locale.c +noinst_HEADERS = utf8-locale.h +testgedcom_LDFLAGS = -L ../gedcom/.libs -lgedcom +testgedcom_LDADD = @INTLLIBS@ + +pathtest_SOURCES = pathtest.c +pathtest_LDFLAGS = -L ../gedcom/.libs -lgedcom + +gomtest_SOURCES = gomtest.c +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 + +TEST_SCRIPT=test_script test_gom test_gom_static +TESTS := $(wildcard $(srcdir)/*.test) EXTRA_DIST=$(TEST_SCRIPT) $(TESTS) + +all-local: + @rm -f testgedcom.out dmalloc.log + +check-% : %.test all-local + @srcdir=$(srcdir); export srcdir; \ + if $(TESTS_ENVIRONMENT) ./$<; then \ + echo "Test succeeded"; \ + else \ + echo "Test failed"; \ + fi + +check-dmalloc-%: %.test all-local + @if [ "@EXTRA_PROGS@" = "" ]; then \ + echo "Please run './configure --with-dmalloc' first"; \ + exit; \ + fi; \ + srcdir=$(srcdir); export srcdir; \ + GOM_DMALLOC_TEST=1; export GOM_DMALLOC_TEST; \ + if $(TESTS_ENVIRONMENT) ./$<; then \ + echo "Test succeeded"; \ + else \ + echo "Test failed"; \ + fi +