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 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189
|
srcdir = @srcdir@
VPATH = @srcdir@
# PROGRAMS includes all test programs built on this platform.
# STDTEST_PORTABLE
# test programs invoked via standard user interface, run on all platforms
# TESTS
# test modules invoked through the abts suite (./testall)
# STDTEST_NONPORTABLE
# test programs invoked via standard user interface, not portable
# OTHER_PROGRAMS
# programs such as sockperf, that have to be invoked in a special sequence
# or with special parameters
# TESTALL_COMPONENTS
# programs such as globalmutexchild which the various TESTS will invoke
# to validate process creation, pipes, dso mechanisms and so forth
STDTEST_PORTABLE = \
testlockperf@EXEEXT@ \
testmutexscope@EXEEXT@ \
testall@EXEEXT@ \
sendfile@EXEEXT@
TESTS = testtime.lo teststr.lo testvsn.lo testipsub.lo testshm.lo \
testmmap.lo testud.lo testtable.lo testsleep.lo testpools.lo \
testfmt.lo testfile.lo testdir.lo testfileinfo.lo testrand.lo \
testdso.lo testoc.lo testdup.lo testsockets.lo testproc.lo \
testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
testenv.lo testprocmutex.lo testfnmatch.lo testatomic.lo testflock.lo \
testsock.lo testglobalmutex.lo teststrnatcmp.lo testfilecopy.lo \
testtemp.lo testlfs.lo testcond.lo testescape.lo testskiplist.lo \
testencode.lo
OTHER_PROGRAMS = \
echod@EXEEXT@ \
sockperf@EXEEXT@
TESTALL_COMPONENTS = \
globalmutexchild@EXEEXT@ \
libmod_test.la \
mod_test.la \
occhild@EXEEXT@ \
proc_child@EXEEXT@ \
readchild@EXEEXT@ \
sockchild@EXEEXT@ \
testshmproducer@EXEEXT@ \
testshmconsumer@EXEEXT@ \
tryread@EXEEXT@
PROGRAMS = $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) \
$(OTHER_PROGRAMS)
TARGETS = $(PROGRAMS)
# bring in rules.mk for standard functionality
@INCLUDE_RULES@
LOCAL_LIBS=../lib@APR_LIBNAME@.la
CLEAN_TARGETS = testfile.tmp lfstests/*.bin \
data/test*.txt data/test*.dat data/apr.testshm.shm
CLEAN_SUBDIRS = internal
INCDIR=../include
INCLUDES=-I$(INCDIR) -I$(srcdir)/../include
# 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 --tag=CC $(COMPILE) $(LT_LDFLAGS) \
@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
OBJECTS_testall = abts.lo testutil.lo $(TESTS) $(LOCAL_LIBS)
testall@EXEEXT@: $(OBJECTS_testall)
$(LINK_PROG) $(OBJECTS_testall) $(ALL_LIBS)
# 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
OBJECTS_testlockperf = testlockperf.lo $(LOCAL_LIBS)
testlockperf@EXEEXT@: $(OBJECTS_testlockperf)
$(LINK_PROG) $(OBJECTS_testlockperf) $(ALL_LIBS)
OBJECTS_testmutexscope = testmutexscope.lo $(LOCAL_LIBS)
testmutexscope@EXEEXT@: $(OBJECTS_testmutexscope)
$(LINK_PROG) $(OBJECTS_testmutexscope) $(ALL_LIBS)
# OTHER_PROGRAMS;
OBJECTS_echod = echod.lo $(LOCAL_LIBS)
echod@EXEEXT@: $(OBJECTS_echod)
$(LINK_PROG) $(OBJECTS_echod) $(ALL_LIBS)
OBJECTS_sendfile = sendfile.lo $(LOCAL_LIBS)
sendfile@EXEEXT@: $(OBJECTS_sendfile)
$(LINK_PROG) $(OBJECTS_sendfile) $(ALL_LIBS)
OBJECTS_sockperf = sockperf.lo $(LOCAL_LIBS)
sockperf@EXEEXT@: $(OBJECTS_sockperf)
$(LINK_PROG) $(OBJECTS_sockperf) $(ALL_LIBS)
# TESTALL_COMPONENTS;
OBJECTS_globalmutexchild = globalmutexchild.lo $(LOCAL_LIBS)
globalmutexchild@EXEEXT@: $(OBJECTS_globalmutexchild)
$(LINK_PROG) $(OBJECTS_globalmutexchild) $(ALL_LIBS)
# Note -prefer-pic is only supported with libtool-1.4+
mod_test.lo: $(srcdir)/mod_test.c
$(LIBTOOL) $(LTFLAGS) --mode=compile --tag=CC $(COMPILE) -prefer-pic -o $@ \
-c $(srcdir)/mod_test.c
OBJECTS_mod_test = mod_test.lo
mod_test.la: $(OBJECTS_mod_test) $(LOCAL_LIBS)
$(LIBTOOL) $(LTFLAGS) --mode=link --tag=CC $(COMPILE) -rpath `pwd` -module \
-avoid-version $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ \
$(OBJECTS_mod_test) $(LOCAL_LIBS)
OBJECTS_libmod_test = mod_test.lo $(LOCAL_LIBS)
libmod_test.la: $(OBJECTS_libmod_test)
$(LIBTOOL) $(LTFLAGS) --mode=link --tag=CC $(COMPILE) -rpath `pwd` \
-avoid-version $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ \
$(OBJECTS_libmod_test) $(ALL_LIBS)
OBJECTS_occhild = occhild.lo $(LOCAL_LIBS)
occhild@EXEEXT@: $(OBJECTS_occhild)
$(LINK_PROG) $(OBJECTS_occhild) $(ALL_LIBS)
OBJECTS_proc_child = proc_child.lo $(LOCAL_LIBS)
proc_child@EXEEXT@: $(OBJECTS_proc_child)
$(LINK_PROG) $(OBJECTS_proc_child) $(ALL_LIBS)
OBJECTS_readchild = readchild.lo $(LOCAL_LIBS)
readchild@EXEEXT@: $(OBJECTS_readchild)
$(LINK_PROG) $(OBJECTS_readchild) $(ALL_LIBS)
OBJECTS_sockchild = sockchild.lo $(LOCAL_LIBS)
sockchild@EXEEXT@: $(OBJECTS_sockchild)
$(LINK_PROG) $(OBJECTS_sockchild) $(ALL_LIBS)
OBJECTS_testshmconsumer = testshmconsumer.lo $(LOCAL_LIBS)
testshmconsumer@EXEEXT@: $(OBJECTS_testshmconsumer) $(LOCAL_LIBS)
$(LINK_PROG) $(OBJECTS_testshmconsumer) $(ALL_LIBS)
OBJECTS_testshmproducer = testshmproducer.lo $(LOCAL_LIBS)
testshmproducer@EXEEXT@: $(OBJECTS_testshmproducer)
$(LINK_PROG) $(OBJECTS_testshmproducer) $(ALL_LIBS)
OBJECTS_tryread = tryread.lo $(LOCAL_LIBS)
tryread@EXEEXT@: $(OBJECTS_tryread)
$(LINK_PROG) $(OBJECTS_tryread) $(ALL_LIBS)
check: $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
teststatus=0; \
progfailed=""; \
for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
if test "$$prog" = 'sendfile@EXEEXT@'; then \
for mode in blocking nonblocking timeout; do \
./$$prog client $$mode startserver 127.0.0.1; \
status=$$?; \
if test $$status != 0; then \
teststatus=$$status; \
progfailed="$$progfailed '$$prog mode $$mode'"; \
fi; \
done; \
else \
./$$prog -v; \
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
|