X-Git-Url: https://git.dlugolecki.net.pl/?a=blobdiff_plain;f=t%2FMakefile.am;h=16854ff9333ae5ad0201de502582823a8a166608;hb=6336a31c95e662cf8664acf8eb1ebeb1e03799a4;hp=6a58363c0eb7356e595ae4430d28d1f7e66da4ad;hpb=31a4189cadf24c423013b2ef0874feb8de7c9169;p=gedcom-parse.git diff --git a/t/Makefile.am b/t/Makefile.am index 6a58363..16854ff 100644 --- a/t/Makefile.am +++ b/t/Makefile.am @@ -2,20 +2,54 @@ # $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 \ + -I $(srcdir)/../utf8 +CFLAGS = -g -O2 + +noinst_PROGRAMS = testgedcom pathtest gomtest @EXTRA_PROGS@ +EXTRA_PROGRAMS = gomtest_static + +testgedcom_SOURCES = standalone.c +testgedcom_LDFLAGS = -L ../gedcom/.libs -lgedcom +testgedcom_LDADD = @INTLLIBS@ ../utf8/libutf8.la + +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 +DMALLOC_LOG = dmalloc.log + +TEST_SCRIPT=test_script test_gom +TESTS := $(wildcard $(srcdir)/*.test) EXTRA_DIST=$(TEST_SCRIPT) $(TESTS) all-local: - rm -f ../testgedcom.out + @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=$(DMALLOC_LOG); export GOM_DMALLOC_TEST; \ + if $(TESTS_ENVIRONMENT) ./$<; then \ + echo "Test succeeded"; \ + else \ + echo "Test failed"; \ + fi +