blob: 9649ce354f8ca82c64dca243cb33c5e98ee530c6 (
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
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
|
AM_CXXFLAGS = $(WARNING_CFLAGS) $(CPPUNIT_CXXFLAGS) $(APR_CXXFLAGS)
INCLUDES = -I$(srcdir)/.. -I$(srcdir)/../gen -I$(top_builddir)/src/gen
#
# Unit test programs.
#
UNIT_TESTS=
UNIT_TESTS+=logging
logging_SOURCES=unit/logging.cpp unit/test_tools.h
logging_LDADD=-lboost_unit_test_framework -lboost_regex $(lib_common)
if CLUSTER
include cluster.mk
endif
# NB: CppUnit test libraries below will be migrated to boost test programs.
# UNIT_TESTS+= ...
# Unit tests
broker_unit_tests = \
AccumulatedAckTest \
BrokerChannelTest \
DtxWorkRecordTest \
ExchangeTest \
HeadersExchangeTest \
InMemoryContentTest \
LazyLoadedContentTest \
MessageBuilderTest \
MessageTest \
ReferenceTest \
QueueRegistryTest \
QueueTest \
QueuePolicyTest \
TopicExchangeTest \
TxAckTest \
TxBufferTest \
TxPublishTest \
ValueTest \
MessageHandlerTest
#client_unit_tests = \
ClientChannelTest
framing_unit_tests = \
FieldTableTest \
FramingTest \
HeaderTest
misc_unit_tests = \
ProducerConsumerTest
posix_unit_tests = \
EventChannelTest \
EventChannelThreadsTest
unit_tests = \
$(broker_unit_tests) \
$(client_unit_tests) \
$(framing_unit_tests) \
$(misc_unit_tests)
# Executables for client tests
testprogs = \
client_test \
echo_service \
topic_listener \
topic_publisher
check_PROGRAMS = $(UNIT_TESTS) $(AIS_UNIT_TESTS) $(testprogs) interop_runner
# FIXME aconway 2007-05-30: TESTS_ENVIRONMENT should have ./run_test
# as below to run valgrind on all test programs.
# Disabled temporarily till leaks in client_test are fixed.
#
#TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir) ./run_test
TESTS_ENVIRONMENT = VALGRIND=$(VALGRIND) srcdir=$(srcdir)
SYSTEM_TESTS = client_test quick_topictest
TESTS = $(UNIT_TESTS) run-unit-tests $(RUN_AIS_TESTS) start_broker $(SYSTEM_TESTS) python_tests kill_broker daemon_test
EXTRA_DIST = \
test_env \
run-unit-tests start_broker python_tests kill_broker daemon_test \
quick_topictest \
topictest \
.valgrind.supp-default \
.valgrindrc-default \
InProcessBroker.h \
MockChannel.h \
MockConnectionInputHandler.h \
TxMocks.h \
qpid_test_plugin.h
include gen.mk
check_LTLIBRARIES += libdlclose_noop.la
libdlclose_noop_la_LDFLAGS = -module -rpath /home/aconway/svn/qpid/cpp/tests
libdlclose_noop_la_SOURCES = dlclose_noop.c
abs_builddir = @abs_builddir@
extra_libs = $(CPPUNIT_LIBS)
lib_client = $(abs_builddir)/../libqpidclient.la
lib_common = $(abs_builddir)/../libqpidcommon.la
lib_broker = $(abs_builddir)/../libqpidbroker.la
gen.mk: Makefile.am
( \
for i in $(testprogs); do \
echo $${i}_SOURCES = $$i.cpp; \
echo $${i}_LDADD = '$$(lib_client) $$(lib_common) $$(extra_libs)'; \
done; \
libs=; \
for i in $(unit_tests); do \
libs="$$libs $${i}.la"; \
echo $${i}_la_SOURCES = $$i.cpp; \
echo $${i}_la_LIBADD = '$$(lib_common) $$(lib_client)'; \
echo $${i}_la_LIBADD += '$$(lib_broker) $$(extra_libs)'; \
echo $${i}_la_LDFLAGS = "-module -rpath `pwd`"; \
done; \
echo "check_LTLIBRARIES =$$libs"; \
) \
> $@-t
mv $@-t $@
check: .valgrindrc .valgrind.supp
check-unit:
$(MAKE) check TESTS=$(UNIT_TESTS) run-unit-tests
# Create a copy so that can be modified without risk of committing the changes.
.valgrindrc: .valgrindrc-default
cp $^ $@
.valgrind.supp: .valgrind.supp-default
cp $^ $@
# Tell GNU make not to build targets in this directory in parallel.
# This is necessary because with two or more identical and simultaneous
# ltmain invocations, one may corrupt the temporaries of the other.
.NOTPARALLEL:
CLEANFILES=valgrind.out qpidd.log .valgrindrc .valgrind.supp
MAINTAINERCLEANFILES=gen.mk
interop_runner_SOURCES = \
interop_runner.cpp \
SimpleTestCaseBase.cpp \
BasicP2PTest.cpp \
BasicPubSubTest.cpp \
SimpleTestCaseBase.h \
BasicP2PTest.h \
BasicPubSubTest.h \
TestCase.h \
TestOptions.h
interop_runner_LDADD = $(lib_client) $(lib_common) $(extra_libs)
|