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