diff options
-rw-r--r-- | cpp/configure.ac | 3 | ||||
-rw-r--r-- | cpp/lib/broker/Makefile.am | 3 | ||||
-rw-r--r-- | cpp/lib/client/Makefile.am | 3 | ||||
-rw-r--r-- | cpp/lib/common/Makefile.am | 61 | ||||
-rw-r--r-- | cpp/tests/Makefile.am | 15 | ||||
-rw-r--r-- | cpp/tests/gen.mk | 101 |
6 files changed, 51 insertions, 135 deletions
diff --git a/cpp/configure.ac b/cpp/configure.ac index 2c8cba40c5..559ec84496 100644 --- a/cpp/configure.ac +++ b/cpp/configure.ac @@ -31,7 +31,8 @@ AC_ARG_ENABLE(warnings, yes|no) ;; *) AC_MSG_ERROR([bad value ${enableval} for warnings option]) ;; esac], - [enableval=no]) + [enableval=yes]) + # Warnings: Enable as many as possible, keep the code clean. Please # do not disable warnings or remove -Werror without discussing on # qpid-dev list. diff --git a/cpp/lib/broker/Makefile.am b/cpp/lib/broker/Makefile.am index e99318087f..fdf9953967 100644 --- a/cpp/lib/broker/Makefile.am +++ b/cpp/lib/broker/Makefile.am @@ -1,5 +1,6 @@ -AM_CXXFLAGS = $(WARNING_CFLAGS) +AM_CXXFLAGS = $(WARNING_CFLAGS) -DUSE_APR=1 INCLUDES = \ + -I$(shell apr-1-config --includedir) \ -I$(top_srcdir)/gen \ -I$(top_srcdir)/lib/common \ -I$(top_srcdir)/lib/common/sys \ diff --git a/cpp/lib/client/Makefile.am b/cpp/lib/client/Makefile.am index db428870aa..fcc571a511 100644 --- a/cpp/lib/client/Makefile.am +++ b/cpp/lib/client/Makefile.am @@ -1,5 +1,6 @@ -AM_CXXFLAGS = $(WARNING_CFLAGS) +AM_CXXFLAGS = $(WARNING_CFLAGS) -DUSE_APR=1 INCLUDES = \ + -I$(shell apr-1-config --includedir) \ -I$(top_srcdir)/gen \ -I$(top_srcdir)/lib/common \ -I$(top_srcdir)/lib/common/sys \ diff --git a/cpp/lib/common/Makefile.am b/cpp/lib/common/Makefile.am index ed02cea6a7..829519eac6 100644 --- a/cpp/lib/common/Makefile.am +++ b/cpp/lib/common/Makefile.am @@ -1,29 +1,44 @@ -AM_CXXFLAGS = $(WARNING_CFLAGS) +AM_CXXFLAGS = $(WARNING_CFLAGS) -DUSE_APR=1 +LIBS = -lapr-1 + INCLUDES = \ + -I$(shell apr-1-config --includedir) \ -I$(top_srcdir)/gen \ -I$(top_srcdir)/lib/common/sys \ -I$(top_srcdir)/lib/common/framing -# This is a kludge to include the contents of the apr/ directory. -# For now, we don't use it. -EXTRA_DIST = \ - sys/apr/APRAcceptor.cpp \ - sys/apr/APRBase.cpp \ - sys/apr/APRBase.h \ - sys/apr/APRPool.cpp \ - sys/apr/APRPool.h \ - sys/apr/APRSocket.cpp \ - sys/apr/APRSocket.h \ - sys/apr/LFProcessor.cpp \ - sys/apr/LFProcessor.h \ - sys/apr/LFSessionContext.cpp \ - sys/apr/LFSessionContext.h \ - sys/apr/Socket.cpp \ - sys/apr/Thread.cpp +apr = sys/apr +apr_src = \ + $(apr)/APRAcceptor.cpp \ + $(apr)/APRBase.cpp \ + $(apr)/APRBase.h \ + $(apr)/APRPool.cpp \ + $(apr)/APRPool.h \ + $(apr)/APRSocket.cpp \ + $(apr)/APRSocket.h \ + $(apr)/LFProcessor.cpp \ + $(apr)/LFProcessor.h \ + $(apr)/LFSessionContext.cpp \ + $(apr)/LFSessionContext.h \ + $(apr)/Socket.cpp \ + $(apr)/Thread.cpp + +posix = sys/posix +posix_src = \ + $(posix)/PosixAcceptor.cpp \ + $(posix)/Socket.cpp \ + $(posix)/Thread.cpp \ + $(posix)/check.cpp \ + $(posix)/check.h \ + $(posix)/EventChannel.cpp \ + $(posix)/EventChannel.h \ + $(posix)/EventChannelThreads.cpp \ + $(posix)/EventChannelThreads.h +EXTRA_DIST=$(posix_src) +platform_src = $(apr_src) framing = framing -posix = sys/posix gen = $(srcdir)/../../gen lib_LTLIBRARIES = libcommon.la @@ -36,6 +51,7 @@ libcommon_la_LDFLAGS = \ $(LIBTOOL_VERSION_INFO_ARG) libcommon_la_SOURCES = \ + $(platform_src) \ $(framing)/AMQBody.cpp \ $(framing)/AMQBody.h \ $(framing)/AMQContentBody.cpp \ @@ -75,15 +91,6 @@ libcommon_la_SOURCES = \ $(gen)/AMQP_ClientProxy.cpp \ $(gen)/AMQP_MethodVersionMap.cpp \ $(gen)/AMQP_ServerProxy.cpp \ - $(posix)/PosixAcceptor.cpp \ - $(posix)/Socket.cpp \ - $(posix)/Thread.cpp \ - $(posix)/check.cpp \ - $(posix)/check.h \ - $(posix)/EventChannel.cpp \ - $(posix)/EventChannel.h \ - $(posix)/EventChannelThreads.cpp \ - $(posix)/EventChannelThreads.h \ Exception.cpp \ Exception.h \ ExceptionHolder.cpp \ diff --git a/cpp/tests/Makefile.am b/cpp/tests/Makefile.am index 8c7acc067d..8649beeeee 100644 --- a/cpp/tests/Makefile.am +++ b/cpp/tests/Makefile.am @@ -1,8 +1,9 @@ # TODO aconway 2006-11-30: nasty hack, should be done by automake? abs_builddir = @abs_builddir@ -AM_CXXFLAGS = $(WARNING_CFLAGS) +AM_CXXFLAGS = $(WARNING_CFLAGS) -DUSE_APR=1 INCLUDES = \ + -I$(shell apr-1-config --includedir) \ -I$(top_srcdir)/gen \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/lib/client \ @@ -62,17 +63,23 @@ posix_tests = \ unit_tests = \ $(broker_tests) \ $(framing_tests) \ - $(misc_tests) \ - $(posix_tests) + $(misc_tests) + noinst_PROGRAMS = $(client_tests) -check: run-unit-tests +check: run-unit-tests run-python-tests .PHONY: run-unit-tests run-unit-tests: $(check_LTLIBRARIES) DllPlugInTester -c -b .libs/*.so +# TODO aconway 2006-12-01: Should also check for qpidd. +run-python-tests: $(check_LTLIBRARIES) + ../src/qpidd > qpidd.log 2>&1 & + cd ../../python ; ./run-tests -v -I cpp_failing.txt + + include gen.mk extra_libs = -lcppunit diff --git a/cpp/tests/gen.mk b/cpp/tests/gen.mk deleted file mode 100644 index bcb09f4822..0000000000 --- a/cpp/tests/gen.mk +++ /dev/null @@ -1,101 +0,0 @@ -client_test_SOURCES = client_test.cpp -client_test_LDADD = $(lib_client) $(lib_common) $(extra_libs) -echo_service_SOURCES = echo_service.cpp -echo_service_LDADD = $(lib_client) $(lib_common) $(extra_libs) -topic_listener_SOURCES = topic_listener.cpp -topic_listener_LDADD = $(lib_client) $(lib_common) $(extra_libs) -topic_publisher_SOURCES = topic_publisher.cpp -topic_publisher_LDADD = $(lib_client) $(lib_common) $(extra_libs) -AccumulatedAckTest_la_SOURCES = AccumulatedAckTest.cpp -AccumulatedAckTest_la_LIBADD = $(lib_common) -AccumulatedAckTest_la_LIBADD += $(lib_broker) $(extra_libs) -AccumulatedAckTest_la_LDFLAGS = -module -rpath $(abs_builddir) -ChannelTest_la_SOURCES = ChannelTest.cpp -ChannelTest_la_LIBADD = $(lib_common) -ChannelTest_la_LIBADD += $(lib_broker) $(extra_libs) -ChannelTest_la_LDFLAGS = -module -rpath $(abs_builddir) -ConfigurationTest_la_SOURCES = ConfigurationTest.cpp -ConfigurationTest_la_LIBADD = $(lib_common) -ConfigurationTest_la_LIBADD += $(lib_broker) $(extra_libs) -ConfigurationTest_la_LDFLAGS = -module -rpath $(abs_builddir) -ExchangeTest_la_SOURCES = ExchangeTest.cpp -ExchangeTest_la_LIBADD = $(lib_common) -ExchangeTest_la_LIBADD += $(lib_broker) $(extra_libs) -ExchangeTest_la_LDFLAGS = -module -rpath $(abs_builddir) -HeadersExchangeTest_la_SOURCES = HeadersExchangeTest.cpp -HeadersExchangeTest_la_LIBADD = $(lib_common) -HeadersExchangeTest_la_LIBADD += $(lib_broker) $(extra_libs) -HeadersExchangeTest_la_LDFLAGS = -module -rpath $(abs_builddir) -InMemoryContentTest_la_SOURCES = InMemoryContentTest.cpp -InMemoryContentTest_la_LIBADD = $(lib_common) -InMemoryContentTest_la_LIBADD += $(lib_broker) $(extra_libs) -InMemoryContentTest_la_LDFLAGS = -module -rpath $(abs_builddir) -LazyLoadedContentTest_la_SOURCES = LazyLoadedContentTest.cpp -LazyLoadedContentTest_la_LIBADD = $(lib_common) -LazyLoadedContentTest_la_LIBADD += $(lib_broker) $(extra_libs) -LazyLoadedContentTest_la_LDFLAGS = -module -rpath $(abs_builddir) -MessageBuilderTest_la_SOURCES = MessageBuilderTest.cpp -MessageBuilderTest_la_LIBADD = $(lib_common) -MessageBuilderTest_la_LIBADD += $(lib_broker) $(extra_libs) -MessageBuilderTest_la_LDFLAGS = -module -rpath $(abs_builddir) -MessageTest_la_SOURCES = MessageTest.cpp -MessageTest_la_LIBADD = $(lib_common) -MessageTest_la_LIBADD += $(lib_broker) $(extra_libs) -MessageTest_la_LDFLAGS = -module -rpath $(abs_builddir) -QueueRegistryTest_la_SOURCES = QueueRegistryTest.cpp -QueueRegistryTest_la_LIBADD = $(lib_common) -QueueRegistryTest_la_LIBADD += $(lib_broker) $(extra_libs) -QueueRegistryTest_la_LDFLAGS = -module -rpath $(abs_builddir) -QueueTest_la_SOURCES = QueueTest.cpp -QueueTest_la_LIBADD = $(lib_common) -QueueTest_la_LIBADD += $(lib_broker) $(extra_libs) -QueueTest_la_LDFLAGS = -module -rpath $(abs_builddir) -TopicExchangeTest_la_SOURCES = TopicExchangeTest.cpp -TopicExchangeTest_la_LIBADD = $(lib_common) -TopicExchangeTest_la_LIBADD += $(lib_broker) $(extra_libs) -TopicExchangeTest_la_LDFLAGS = -module -rpath $(abs_builddir) -TxAckTest_la_SOURCES = TxAckTest.cpp -TxAckTest_la_LIBADD = $(lib_common) -TxAckTest_la_LIBADD += $(lib_broker) $(extra_libs) -TxAckTest_la_LDFLAGS = -module -rpath $(abs_builddir) -TxBufferTest_la_SOURCES = TxBufferTest.cpp -TxBufferTest_la_LIBADD = $(lib_common) -TxBufferTest_la_LIBADD += $(lib_broker) $(extra_libs) -TxBufferTest_la_LDFLAGS = -module -rpath $(abs_builddir) -TxPublishTest_la_SOURCES = TxPublishTest.cpp -TxPublishTest_la_LIBADD = $(lib_common) -TxPublishTest_la_LIBADD += $(lib_broker) $(extra_libs) -TxPublishTest_la_LDFLAGS = -module -rpath $(abs_builddir) -ValueTest_la_SOURCES = ValueTest.cpp -ValueTest_la_LIBADD = $(lib_common) -ValueTest_la_LIBADD += $(lib_broker) $(extra_libs) -ValueTest_la_LDFLAGS = -module -rpath $(abs_builddir) -BodyHandlerTest_la_SOURCES = BodyHandlerTest.cpp -BodyHandlerTest_la_LIBADD = $(lib_common) -BodyHandlerTest_la_LIBADD += $(lib_broker) $(extra_libs) -BodyHandlerTest_la_LDFLAGS = -module -rpath $(abs_builddir) -FieldTableTest_la_SOURCES = FieldTableTest.cpp -FieldTableTest_la_LIBADD = $(lib_common) -FieldTableTest_la_LIBADD += $(lib_broker) $(extra_libs) -FieldTableTest_la_LDFLAGS = -module -rpath $(abs_builddir) -FramingTest_la_SOURCES = FramingTest.cpp -FramingTest_la_LIBADD = $(lib_common) -FramingTest_la_LIBADD += $(lib_broker) $(extra_libs) -FramingTest_la_LDFLAGS = -module -rpath $(abs_builddir) -HeaderTest_la_SOURCES = HeaderTest.cpp -HeaderTest_la_LIBADD = $(lib_common) -HeaderTest_la_LIBADD += $(lib_broker) $(extra_libs) -HeaderTest_la_LDFLAGS = -module -rpath $(abs_builddir) -ExceptionTest_la_SOURCES = ExceptionTest.cpp -ExceptionTest_la_LIBADD = $(lib_common) -ExceptionTest_la_LIBADD += $(lib_broker) $(extra_libs) -ExceptionTest_la_LDFLAGS = -module -rpath $(abs_builddir) -EventChannelTest_la_SOURCES = EventChannelTest.cpp -EventChannelTest_la_LIBADD = $(lib_common) -EventChannelTest_la_LIBADD += $(lib_broker) $(extra_libs) -EventChannelTest_la_LDFLAGS = -module -rpath $(abs_builddir) -EventChannelThreadsTest_la_SOURCES = EventChannelThreadsTest.cpp -EventChannelThreadsTest_la_LIBADD = $(lib_common) -EventChannelThreadsTest_la_LIBADD += $(lib_broker) $(extra_libs) -EventChannelThreadsTest_la_LDFLAGS = -module -rpath $(abs_builddir) -check_LTLIBRARIES = AccumulatedAckTest.la ChannelTest.la ConfigurationTest.la ExchangeTest.la HeadersExchangeTest.la InMemoryContentTest.la LazyLoadedContentTest.la MessageBuilderTest.la MessageTest.la QueueRegistryTest.la QueueTest.la TopicExchangeTest.la TxAckTest.la TxBufferTest.la TxPublishTest.la ValueTest.la BodyHandlerTest.la FieldTableTest.la FramingTest.la HeaderTest.la ExceptionTest.la EventChannelTest.la EventChannelThreadsTest.la |