4
4
# PROGRAMS includes all test programs built on this platform.
6
6
# test programs invoked via standard user interface, run on all platforms
8
# test modules invoked through the abts suite (./testall)
7
9
# STDTEST_NONPORTABLE
8
10
# test programs invoked via standard user interface, not portable
10
12
# programs such as sendfile, that have to be invoked in a special sequence
11
13
# or with special parameters
15
# programs such as globalmutexchild which the various TESTS will invoke
16
# to validate process creation, pipes, dso mechansims and so forth
13
18
STDTEST_PORTABLE = \
14
19
testlockperf@EXEEXT@ \
15
20
testmutexscope@EXEEXT@ \
23
TESTS = testtime.lo teststr.lo testvsn.lo testipsub.lo \
24
testmmap.lo testud.lo testtable.lo testsleep.lo testpools.lo \
25
testfmt.lo testfile.lo testdir.lo testfileinfo.lo testrand.lo \
26
testdso.lo testoc.lo testdup.lo testsockets.lo testproc.lo \
27
testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
28
testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
29
testenv.lo testprocmutex.lo testrand2.lo testfnmatch.lo \
30
testatomic.lo testflock.lo testshm.lo testsock.lo testglobalmutex.lo \
31
teststrnatcmp.lo testfilecopy.lo testtemp.lo testlfs.lo
36
TESTALL_COMPONENTS = \
37
globalmutexchild@EXEEXT@ \
20
44
testshmproducer@EXEEXT@ \
21
testshmconsumer@EXEEXT@
45
testshmconsumer@EXEEXT@ \
23
PROGRAMS = $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) $(OTHER_PROGRAMS)
48
PROGRAMS = $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) \
25
51
TARGETS = $(PROGRAMS)
41
66
# link programs using -no-install to get real executables not
42
67
# libtool wrapper scripts which link an executable when first run.
43
LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) @LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@
45
check: $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
68
LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) \
69
@LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@
73
abts.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
76
testutil.lo: $(srcdir)/abts.c $(srcdir)/abts.h $(srcdir)/abts_tests.h \
79
OBJECTS_testall = abts.lo testutil.lo $(TESTS) $(LOCAL_LIBS)
80
testall@EXEEXT@: $(OBJECTS_testall)
81
$(LINK_PROG) $(OBJECTS_testall) $(ALL_LIBS)
82
# For VPATH builds; where we have no ./data, copy us some data
83
# if we wait until 'make check', then 'make; ./testall' fails;
84
if test ! -d "./data"; then cp -r $(srcdir)/data data; fi
86
OBJECTS_testlockperf = testlockperf.lo $(LOCAL_LIBS)
87
testlockperf@EXEEXT@: $(OBJECTS_testlockperf)
88
$(LINK_PROG) $(OBJECTS_testlockperf) $(ALL_LIBS)
90
OBJECTS_testmutexscope = testmutexscope.lo $(LOCAL_LIBS)
91
testmutexscope@EXEEXT@: $(OBJECTS_testmutexscope)
92
$(LINK_PROG) $(OBJECTS_testmutexscope) $(ALL_LIBS)
96
OBJECTS_sendfile = sendfile.lo $(LOCAL_LIBS)
97
sendfile@EXEEXT@: $(OBJECTS_sendfile)
98
$(LINK_PROG) $(OBJECTS_sendfile) $(ALL_LIBS)
100
# TESTALL_COMPONENTS;
102
OBJECTS_globalmutexchild = globalmutexchild.lo $(LOCAL_LIBS)
103
globalmutexchild@EXEEXT@: $(OBJECTS_globalmutexchild)
104
$(LINK_PROG) $(OBJECTS_globalmutexchild) $(ALL_LIBS)
106
# Note: -prefer-pic is only supported with libtool-1.4+
107
mod_test.lo: $(srcdir)/mod_test.c
108
$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -prefer-pic -o $@ \
109
-c $(srcdir)/mod_test.c
111
OBJECTS_mod_test = mod_test.lo
112
mod_test.la: $(OBJECTS_mod_test)
113
$(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` -module \
114
-avoid-version $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ \
117
OBJECTS_libmod_test = mod_test.lo $(LOCAL_LIBS)
118
libmod_test.la: $(OBJECTS_libmod_test)
119
$(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` \
120
-avoid-version $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ \
121
$(OBJECTS_libmod_test) $(ALL_LIBS)
123
OBJECTS_occhild = occhild.lo $(LOCAL_LIBS)
124
occhild@EXEEXT@: $(OBJECTS_occhild)
125
$(LINK_PROG) $(OBJECTS_occhild) $(ALL_LIBS)
127
OBJECTS_proc_child = proc_child.lo $(LOCAL_LIBS)
128
proc_child@EXEEXT@: $(OBJECTS_proc_child)
129
$(LINK_PROG) $(OBJECTS_proc_child) $(ALL_LIBS)
131
OBJECTS_readchild = readchild.lo $(LOCAL_LIBS)
132
readchild@EXEEXT@: $(OBJECTS_readchild)
133
$(LINK_PROG) $(OBJECTS_readchild) $(ALL_LIBS)
135
OBJECTS_sockchild = sockchild.lo $(LOCAL_LIBS)
136
sockchild@EXEEXT@: $(OBJECTS_sockchild)
137
$(LINK_PROG) $(OBJECTS_sockchild) $(ALL_LIBS)
139
OBJECTS_testshmconsumer = testshmconsumer.lo $(LOCAL_LIBS)
140
testshmconsumer@EXEEXT@: $(OBJECTS_testshmconsumer) $(LOCAL_LIBS)
141
$(LINK_PROG) $(OBJECTS_testshmconsumer) $(ALL_LIBS)
143
OBJECTS_testshmproducer = testshmproducer.lo $(LOCAL_LIBS)
144
testshmproducer@EXEEXT@: $(OBJECTS_testshmproducer)
145
$(LINK_PROG) $(OBJECTS_testshmproducer) $(ALL_LIBS)
147
OBJECTS_tryread = tryread.lo $(LOCAL_LIBS)
148
tryread@EXEEXT@: $(OBJECTS_tryread)
149
$(LINK_PROG) $(OBJECTS_tryread) $(ALL_LIBS)
151
check: $(TESTALL_COMPONENTS) $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
46
152
for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
48
154
if test $$? = 255; then \
54
occhild@EXEEXT@: occhild.lo $(LOCAL_LIBS)
55
$(LINK_PROG) occhild.lo $(LOCAL_LIBS) $(ALL_LIBS)
57
sockchild@EXEEXT@: sockchild.lo $(LOCAL_LIBS)
58
$(LINK_PROG) sockchild.lo $(LOCAL_LIBS) $(ALL_LIBS)
60
readchild@EXEEXT@: readchild.lo $(LOCAL_LIBS)
61
$(LINK_PROG) readchild.lo $(LOCAL_LIBS) $(ALL_LIBS)
63
globalmutexchild@EXEEXT@: globalmutexchild.lo $(LOCAL_LIBS)
64
$(LINK_PROG) globalmutexchild.lo $(LOCAL_LIBS) $(ALL_LIBS)
66
tryread@EXEEXT@: tryread.lo $(LOCAL_LIBS)
67
$(LINK_PROG) tryread.lo $(LOCAL_LIBS) $(ALL_LIBS)
69
proc_child@EXEEXT@: proc_child.lo $(LOCAL_LIBS)
70
$(LINK_PROG) proc_child.lo $(LOCAL_LIBS) $(ALL_LIBS)
72
# FIXME: -prefer-pic is only supported with libtool-1.4+
73
mod_test.slo: $(srcdir)/mod_test.c
74
$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -prefer-pic -c $(srcdir)/mod_test.c && touch $@
76
mod_test.la: mod_test.slo $(LOCAL_LIBS)
77
$(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` -avoid-version -module mod_test.lo $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
79
libmod_test.la: mod_test.slo $(LOCAL_LIBS)
80
$(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` -avoid-version mod_test.lo $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ $(LOCAL_LIBS) $(ALL_LIBS)
82
testlockperf@EXEEXT@: testlockperf.lo $(LOCAL_LIBS)
83
$(LINK_PROG) testlockperf.lo $(LOCAL_LIBS) $(ALL_LIBS)
85
sendfile@EXEEXT@: sendfile.lo $(LOCAL_LIBS)
86
$(LINK_PROG) sendfile.lo $(LOCAL_LIBS) $(ALL_LIBS)
88
testshmproducer@EXEEXT@: testshmproducer.lo $(LOCAL_LIBS)
89
$(LINK_PROG) testshmproducer.lo $(LOCAL_LIBS) $(ALL_LIBS)
91
testshmconsumer@EXEEXT@: testshmconsumer.lo $(LOCAL_LIBS)
92
$(LINK_PROG) testshmconsumer.lo $(LOCAL_LIBS) $(ALL_LIBS)
94
testprocmutex@EXEEXT@: testprocmutex.lo $(LOCAL_LIBS)
95
$(LINK_PROG) testprocmutex.lo $(LOCAL_LIBS) $(ALL_LIBS)
97
testmutexscope@EXEEXT@: testmutexscope.lo $(LOCAL_LIBS)
98
$(LINK_PROG) testmutexscope.lo $(LOCAL_LIBS) $(ALL_LIBS)
100
TESTS = testutil.lo testtime.lo teststr.lo testvsn.lo testipsub.lo \
101
testmmap.lo testud.lo testtable.lo testsleep.lo testpools.lo \
102
testfmt.lo testfile.lo testdir.lo testfileinfo.lo testrand.lo \
103
testdso.lo testoc.lo testdup.lo testsockets.lo testproc.lo \
104
testpoll.lo testlock.lo testsockopt.lo testpipe.lo testthread.lo \
105
testhash.lo testargs.lo testnames.lo testuser.lo testpath.lo \
106
testenv.lo testprocmutex.lo testrand2.lo testfnmatch.lo \
107
testatomic.lo testflock.lo testshm.lo testsock.lo testglobalmutex.lo \
108
teststrnatcmp.lo testfilecopy.lo testtemp.lo testlfs.lo
110
testall@EXEEXT@: $(TESTS) mod_test.la libmod_test.la occhild@EXEEXT@ \
111
readchild@EXEEXT@ abts.lo proc_child@EXEEXT@ \
112
tryread@EXEEXT@ sockchild@EXEEXT@ globalmutexchild@EXEEXT@ \
114
$(LINK_PROG) $(TESTS) abts.lo $(LOCAL_LIBS) $(ALL_LIBS)