summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorStephen D. Huston <shuston@apache.org>2009-07-01 15:25:27 +0000
committerStephen D. Huston <shuston@apache.org>2009-07-01 15:25:27 +0000
commitf214a928494eb622303370d3f5a62d1b4dc7e56d (patch)
treece9a2ea44e37c6272e57813e59fcd35cab9cb2e8 /cpp/src
parent344067e253c58f6ee2ed985752d184d00667b8c1 (diff)
downloadqpid-python-f214a928494eb622303370d3f5a62d1b4dc7e56d.tar.gz
Enabled tests, corrected Boost lib locators
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@790216 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/CMakeLists.txt14
-rw-r--r--cpp/src/tests/CMakeLists.txt38
2 files changed, 22 insertions, 30 deletions
diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt
index 39e0159ac2..f34441b532 100644
--- a/cpp/src/CMakeLists.txt
+++ b/cpp/src/CMakeLists.txt
@@ -147,7 +147,8 @@ endif (ENABLE_WARNINGS AND CMAKE_COMPILER_IS_GNUCXX)
# Expand a bit from the basic Find_Boost; be specific about what's needed.
find_package(Boost 1.33 REQUIRED
- COMPONENTS date_time program_options regex thread unit_test_framework)
+ COMPONENTS date_time filesystem program_options thread
+ regex unit_test_framework)
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost C++ libraries not found. Please install or try setting BOOST_ROOT")
endif(NOT Boost_FOUND)
@@ -254,7 +255,7 @@ if (BUILD_ACL)
qpid/acl/AclReader.h
)
add_library (acl MODULE ${acl_SOURCES})
- target_link_libraries (acl qpidbroker)
+ target_link_libraries (acl qpidbroker ${Boost_PROGRAM_OPTIONS_LIBRARY})
if (CMAKE_COMPILER_IS_GNUCXX)
set_target_properties (acl PROPERTIES
PREFIX ""
@@ -354,8 +355,8 @@ else (CMAKE_SYSTEM_NAME STREQUAL Windows)
${qpid_poller_module}
)
set (libqpidcommon_platform_LIBS
- ${Boost_program_options_LIBRARY}
- ${Boost_filesystem_LIBRARY}
+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
+ ${Boost_FILESYSTEM_LIBRARY}
uuid
${CMAKE_DL_LIBS}
)
@@ -687,7 +688,4 @@ add_definitions(-DHAVE_CONFIG_H)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
${CMAKE_CURRENT_BINARY_DIR}/config.h)
-# tests has EXCLUDE_FROM_ALL to avoid building and running tests during
-# "make all". Top-level CMakeLists has a "check" target that runs the tests
-# and all the tests are dependencies of "check" so they'll get built then.
-add_subdirectory(tests EXCLUDE_FROM_ALL)
+add_subdirectory(tests)
diff --git a/cpp/src/tests/CMakeLists.txt b/cpp/src/tests/CMakeLists.txt
index 06f22fc487..fdd9836a7e 100644
--- a/cpp/src/tests/CMakeLists.txt
+++ b/cpp/src/tests/CMakeLists.txt
@@ -28,6 +28,20 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
include (FindPythonInterp)
+# If valgrind is selected in the configuration step, set up the path to it
+# for CTest.
+if (ENABLE_VALGRIND)
+ set (MEMORYCHECK_COMMAND ${VALGRIND})
+ set (MEMORYCHECK_COMMAND_OPTIONS "--gen-suppressions=all
+--leak-check=full
+--demangle=yes
+--suppressions=${CMAKE_CURRENT_SOURCE_DIR}/.valgrind.supp
+--num-callers=25
+--log-file=ctest_valgrind.vglog")
+else (ENABLE_VALGRIND)
+ unset (MEMORYCHECK_COMMAND)
+endif (ENABLE_VALGRIND)
+
# Using the Boost DLLs triggers warning 4275 on Visual Studio
# (non dll-interface class used as base for dll-interface class).
# This is ok, so suppress the warning.
@@ -38,8 +52,8 @@ endif (MSVC)
# Like this to work with cmake 2.4 on Unix
set (qpid_test_boost_libs
- ${Boost_regex_LIBRARY}
- ${Boost_unit_test_framework_LIBRARY})
+ ${Boost_REGEX_LIBRARY}
+ ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
# Macro to make it easier to remember where the tests are built
macro(remember_location testname)
@@ -140,10 +154,8 @@ target_link_libraries (unit_test
${qpid_test_boost_libs}
qpidclient qpidbroker qmfconsole)
remember_location(unit_test)
-add_dependencies (check unit_test)
add_library (shlibtest MODULE shlibtest.cpp)
-add_dependencies (check shlibtest)
#libshlibtest_la_LDFLAGS = -module -rpath $(abs_builddir)
#include cluster.mk
@@ -158,108 +170,90 @@ add_executable (perftest perftest.cpp ${platform_test_additions})
target_link_libraries (perftest qpidclient)
#perftest_SOURCES=perftest.cpp test_tools.h TestOptions.h ConnectionOptions.h
remember_location(perftest)
-add_dependencies (check perftest)
add_executable (txtest txtest.cpp ${platform_test_additions})
target_link_libraries (txtest qpidclient)
#txtest_SOURCES=txtest.cpp TestOptions.h ConnectionOptions.h
remember_location(txtest)
-add_dependencies (check txtest)
add_executable (latencytest latencytest.cpp ${platform_test_additions})
target_link_libraries (latencytest qpidclient)
#latencytest_SOURCES=latencytest.cpp TestOptions.h ConnectionOptions.h
remember_location(latencytest)
-add_dependencies (check latencytest)
add_executable (echotest echotest.cpp ${platform_test_additions})
target_link_libraries (echotest qpidclient)
#echotest_SOURCES=echotest.cpp TestOptions.h ConnectionOptions.h
remember_location(echotest)
-add_dependencies (check echotest)
add_executable (client_test client_test.cpp ${platform_test_additions})
target_link_libraries (client_test qpidclient)
#client_test_SOURCES=client_test.cpp TestOptions.h ConnectionOptions.h
remember_location(client_test)
-add_dependencies (check client_test)
add_executable (topic_listener topic_listener.cpp ${platform_test_additions})
target_link_libraries (topic_listener qpidclient)
#topic_listener_SOURCES=topic_listener.cpp TestOptions.h ConnectionOptions.h
remember_location(topic_listener)
-add_dependencies (check topic_listener)
add_executable (topic_publisher topic_publisher.cpp ${platform_test_additions})
target_link_libraries (topic_publisher qpidclient)
#topic_publisher_SOURCES=topic_publisher.cpp TestOptions.h ConnectionOptions.h
remember_location(topic_publisher)
-add_dependencies (check topic_publisher)
add_executable (publish publish.cpp ${platform_test_additions})
target_link_libraries (publish qpidclient)
#publish_SOURCES=publish.cpp TestOptions.h ConnectionOptions.h
remember_location(publish)
-add_dependencies (check publish)
add_executable (consume consume.cpp ${platform_test_additions})
target_link_libraries (consume qpidclient)
#consume_SOURCES=consume.cpp TestOptions.h ConnectionOptions.h
remember_location(consume)
-add_dependencies (check consume)
add_executable (header_test header_test.cpp ${platform_test_additions})
target_link_libraries (header_test qpidclient)
#header_test_SOURCES=header_test.cpp TestOptions.h ConnectionOptions.h
remember_location(header_test)
-add_dependencies (check header_test)
if (BUILD_CLUSTER)
add_executable (failover_soak failover_soak.cpp ForkedBroker.cpp ${platform_test_additions})
target_link_libraries (failover_soak qpidclient)
#failover_soak_SOURCES=failover_soak.cpp ForkedBroker.h
remember_location(failover_soak)
- add_dependencies (check failover_soak)
endif (BUILD_CLUSTER)
add_executable (declare_queues declare_queues.cpp ${platform_test_additions})
target_link_libraries (declare_queues qpidclient)
remember_location(declare_queues)
-add_dependencies (check declare_queues)
add_executable (replaying_sender replaying_sender.cpp ${platform_test_additions})
target_link_libraries (replaying_sender qpidclient)
remember_location(replaying_sender)
-add_dependencies (check replaying_sender)
add_executable (resuming_receiver resuming_receiver.cpp ${platform_test_additions})
target_link_libraries (resuming_receiver qpidclient)
remember_location(resuming_receiver)
-add_dependencies (check resuming_receiver)
add_executable (txshift txshift.cpp ${platform_test_additions})
target_link_libraries (txshift qpidclient)
#txshift_SOURCES=txshift.cpp TestOptions.h ConnectionOptions.h
remember_location(txshift)
-add_dependencies (check txshift)
add_executable (txjob txjob.cpp ${platform_test_additions})
target_link_libraries (txjob qpidclient)
#txjob_SOURCES=txjob.cpp TestOptions.h ConnectionOptions.h
remember_location(txjob)
-add_dependencies (check txjob)
add_executable (receiver receiver.cpp ${platform_test_additions})
target_link_libraries (receiver qpidclient)
#receiver_SOURCES=receiver.cpp TestOptions.h ConnectionOptions.h
remember_location(receiver)
-add_dependencies (check receiver)
add_executable (sender sender.cpp ${platform_test_additions})
target_link_libraries (sender qpidclient)
#sender_SOURCES=sender.cpp TestOptions.h ConnectionOptions.h
remember_location(sender)
-add_dependencies (check sender)
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
set (ENV{OUTDIR} ${EXECUTABLE_OUTPUT_PATH})