Use of pre_cleanups is not the default for reslists.
[apr-util.git] / test / Makefile.in
blob9b6890a805413b52d2b4fb2e48663a60b885a424
1 srcdir = @srcdir@
2 VPATH = @srcdir@
4 # PROGRAMS includes all test programs built on this platform.
5 # STDTEST_PORTABLE
6 # test programs invoked via standard user interface, run on all platforms
7 # ALL_TESTS
8 # test modules invoked through the abts suite (./testall)
9 # OTHER_PROGRAMS
10 # programs such as sockperf, that have to be invoked in a special sequence
11 # or with special parameters
13 INCLUDES = @APRUTIL_PRIV_INCLUDES@ @APR_INCLUDES@ @APRUTIL_INCLUDES@
15 STDTEST_PORTABLE = testall dbd
17 TESTS = teststrmatch.lo testuri.lo testuuid.lo testbuckets.lo testpass.lo \
18 testmd4.lo testmd5.lo testldap.lo testdate.lo testdbm.lo testdbd.lo \
19 testxml.lo testrmm.lo testreslist.lo testqueue.lo testxlate.lo \
20 testmemcache.lo
22 PROGRAMS = $(STDTEST_PORTABLE)
24 TARGETS = $(PROGRAMS)
26 LOCAL_LIBS = ../lib@APRUTIL_LIBNAME@@APRUTIL_MAJOR_VERSION@.la
28 CLEAN_TARGETS = manyfile.bin testfile.txt data/sqlite*.db
30 # bring in rules.mk for standard functionality
31 @INCLUDE_RULES@
32 APRUTIL_LIBS = @APRUTIL_LIBS@
33 APRUTIL_LDFLAGS = $(ALL_LDFLAGS) @LT_NO_INSTALL@ @APRUTIL_LDFLAGS@
35 # link programs using -no-install to get real executables not
36 # libtool wrapper scripts which link an executable when first run.
37 LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) \
38 $(APRUTIL_LDFLAGS) -o $@
40 # STDTEST_PORTABLE;
42 abts.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
43 $(srcdir)/testutil.h
45 testutil.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
46 $(srcdir)/testutil.h
48 OBJECTS_testall = abts.lo testutil.lo $(TESTS) $(LOCAL_LIBS)
49 testall: $(OBJECTS_testall)
50 $(LINK_PROG) $(OBJECTS_testall) $(APRUTIL_LIBS) @LDADD_ldap@
51 # For VPATH builds; where we have no ./data, copy us some data
52 # if we wait until 'make check', then 'make; ./testall' fails;
53 if test ! -d "./data"; then cp -r $(srcdir)/data data; fi
55 OBJECTS_dbd = dbd.lo $(LOCAL_LIBS)
56 dbd: $(OBJECTS_dbd)
57 $(LINK_PROG) $(OBJECTS_dbd) $(APRUTIL_LIBS)
59 check: $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
60 teststatus=0; \
61 progfailed=""; \
62 for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
63 if test "$$prog" = 'dbd'; then \
64 for driver in sqlite2 sqlite3; do \
65 @apr_shlibpath_var@="`echo "../dbd/.libs:../ldap/.libs:$$@apr_shlibpath_var@" | sed -e 's/::*$$//'`" \
66 ./$$prog $$driver; \
67 status=$$?; \
68 if test $$status != 0; then \
69 teststatus=$$status; \
70 progfailed="$$progfailed '$$prog $$driver'"; \
71 fi; \
72 done; \
73 else \
74 @apr_shlibpath_var@="`echo "../dbd/.libs:../ldap/.libs:$$@apr_shlibpath_var@" | sed -e 's/::*$$//'`" \
75 ./$$prog; \
76 status=$$?; \
77 if test $$status != 0; then \
78 teststatus=$$status; \
79 progfailed="$$progfailed $$prog"; \
80 fi; \
81 fi; \
82 done; \
83 if test $$teststatus != 0; then \
84 echo "Programs failed:$$progfailed"; \
85 fi; \
86 exit $$teststatus
88 # DO NOT REMOVE