You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2013/10/24 17:00:12 UTC

svn commit: r1535398 - in /qpid/trunk/qpid/cpp: src/CMakeLists.txt src/tests/CMakeLists.txt src/tests/legacystore/CMakeLists.txt src/tests/legacystore/start_broker src/tests/legacystore/stop_broker src/tests/run_test src/tests/test_env.sh.in versions

Author: astitcher
Date: Thu Oct 24 15:00:11 2013
New Revision: 1535398

URL: http://svn.apache.org/r1535398
Log:
QPID-4927: Get cmake testing working with valgrind
[also remove unused files]

Removed:
    qpid/trunk/qpid/cpp/src/tests/legacystore/start_broker
    qpid/trunk/qpid/cpp/src/tests/legacystore/stop_broker
    qpid/trunk/qpid/cpp/versions
Modified:
    qpid/trunk/qpid/cpp/src/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt
    qpid/trunk/qpid/cpp/src/tests/run_test
    qpid/trunk/qpid/cpp/src/tests/test_env.sh.in

Modified: qpid/trunk/qpid/cpp/src/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/CMakeLists.txt?rev=1535398&r1=1535397&r2=1535398&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/CMakeLists.txt Thu Oct 24 15:00:11 2013
@@ -44,7 +44,13 @@ include(CheckLibraryExists)
 include(CheckSymbolExists)
 include(FindBoost)
 include(FindDoxygen)
+include(FindRuby)
 include(FindPkgConfig)
+include(FindPythonInterp)
+
+find_program(VALGRIND_EXECUTABLE valgrind DOC "Location of the valgrind program")
+mark_as_advanced(VALGRIND_EXECUTABLE)
+find_package_handle_standard_args(VALGRIND DEFAULT_MSG VALGRIND_EXECUTABLE)
 
 #set (CMAKE_VERBOSE_MAKEFILE ON)  # for debugging
 
@@ -157,9 +163,9 @@ ENDMACRO (add_msvc_version)
 
 # Add a test to check the exported library API against expected API symbols
 MACRO (add_api_test libname)
-  if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+  if (NOT CMAKE_SYSTEM_NAME STREQUAL Windows AND BUILD_TESTING)
     add_test(api_check_${libname} ${CMAKE_CURRENT_SOURCE_DIR}/check-abi "${ENV_CXX}" ${CMAKE_CURRENT_BINARY_DIR}/lib${libname}.so ${CMAKE_CURRENT_SOURCE_DIR}/lib${libname}-api-symbols.txt)
-  endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows)
+  endif (NOT CMAKE_SYSTEM_NAME STREQUAL Windows AND BUILD_TESTING)
 ENDMACRO (add_api_test libname)
 
 
@@ -195,8 +201,6 @@ inherit_value ("winver_LEGAL_COPYRIGHT" 
 set(AMQP_SPEC_DIR ${qpid-cpp_SOURCE_DIR}/../specs)
 set(AMQP_SPEC ${AMQP_SPEC_DIR}/amqp.0-10-qpid-errata.stripped.xml)
 if (EXISTS ${AMQP_SPEC})
-  include(FindRuby)
-  include(FindPythonInterp)
   if (NOT RUBY_EXECUTABLE)
     message(FATAL_ERROR "Can't locate ruby, needed to generate source files.")
   endif (NOT RUBY_EXECUTABLE)
@@ -256,29 +260,16 @@ else (EXISTS ${AMQP_SPEC})
   include (managementgen.cmake)
 endif (EXISTS ${AMQP_SPEC})
 
-find_program(HELP2MAN help2man DOC "Location of the help2man program")
-option(GEN_MANPAGES "Use help2man to generate man pages" ON)
-if (GEN_MANPAGES AND NOT HELP2MAN)
-  message(STATUS "Can't locate the help2man command; man pages will not be generated")
-  set (GEN_MANPAGES OFF)
-endif (GEN_MANPAGES AND NOT HELP2MAN)
-
 # FindDoxygen module tries to locate doxygen and Graphviz dot
-set (docs_default ON)
-if (NOT DOXYGEN_EXECUTABLE)
-  set (docs_default OFF)
-endif (NOT DOXYGEN_EXECUTABLE)
-option(GEN_DOXYGEN "Use doxygen to generate user documentation" ${docs_default})
-if (GEN_DOXYGEN AND NOT DOXYGEN_EXECUTABLE)
-  message(STATUS "Can't locate the doxygen command; user documentation will not be generated")
-  set (GEN_DOXYGEN OFF)
-endif (GEN_DOXYGEN AND NOT DOXYGEN_EXECUTABLE)
-
-find_program(VALGRIND valgrind DOC "Location of the valgrind program")
-option(ENABLE_VALGRIND "Use valgrind to detect run-time problems" ON)
-if (ENABLE_VALGRIND AND NOT VALGRIND)
-  message(STATUS "Can't locate the valgrind command; no run-time error detection")
-endif (ENABLE_VALGRIND AND NOT VALGRIND)
+if (DOXYGEN_EXECUTABLE)
+  option(GEN_DOXYGEN "Use doxygen to generate user documentation" ON)
+else (DOXYGEN_EXECUTABLE)
+  message(STATUS "Can't locate the doxygen command; user documentation cannot be generated")
+endif (DOXYGEN_EXECUTABLE)
+
+if (VALGRIND_FOUND)
+  option(ENABLE_VALGRIND "Use valgrind to detect run-time problems" ON)
+endif (VALGRIND_FOUND)
 
 # Do not keep on linking against transitive library dependencies
 set (CMAKE_LINK_INTERFACE_LIBRARIES "")

Modified: qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt?rev=1535398&r1=1535397&r2=1535398&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/tests/CMakeLists.txt Thu Oct 24 15:00:11 2013
@@ -17,9 +17,6 @@
 # under the License.
 #
 
-# Enable dashboard reporting.
-include (CTest)
-
 # Make sure that everything get built before the tests
 # Need to create a var with all the necessary top level targets
 
@@ -30,38 +27,6 @@ endif (QPID_LINK_BOOST_DYNAMIC)
 
 include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
 
-include (FindPythonInterp)
-
-# Create the environment scripts for tests
-set (abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-set (abs_builddir ${CMAKE_CURRENT_BINARY_DIR})
-set (abs_top_srcdir ${CMAKE_SOURCE_DIR})
-set (abs_top_builddir ${CMAKE_BINARY_DIR})
-set (builddir_lib_suffix "")
-
-if (CMAKE_SYSTEM_NAME STREQUAL Windows)
-  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/test_env.ps1.in
-    ${CMAKE_CURRENT_BINARY_DIR}/test_env.ps1)
-else (CMAKE_SYSTEM_NAME STREQUAL Windows)
-  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/test_env.sh.in
-    ${CMAKE_CURRENT_BINARY_DIR}/test_env.sh)
-endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
-
-# Copy qpidd-p0 script to build directory so tests can find it.
-configure_file (${CMAKE_CURRENT_SOURCE_DIR}/qpidd-p0 ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
-
-# 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")
-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.
@@ -72,10 +37,6 @@ if (MSVC)
   add_definitions( /wd4275 /wd4503 /D_CRT_SECURE_NO_WARNINGS)
 endif (MSVC)
 
-# Like this to work with cmake 2.4 on Unix
-set (qpid_test_boost_libs 
-     ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SYSTEM_LIBRARY})
-
 # Macro to make it easier to remember where the tests are built
 macro(remember_location testname)
   set (${testname}_LOCATION ${CMAKE_CURRENT_BINARY_DIR}/${testname}${CMAKE_EXECUTABLE_SUFFIX})
@@ -93,6 +54,87 @@ if (CMAKE_SYSTEM_NAME STREQUAL Windows)
   endif (NOT QPID_WINDOWS_DEFAULT_TEST_OUTPUTS)
 endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
 
+# Some generally useful utilities that just happen to be built in the test area
+add_executable (qpid-perftest qpid-perftest.cpp ${platform_test_additions})
+target_link_libraries (qpid-perftest qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(qpid-perftest)
+
+add_executable (qpid-latency-test qpid-latency-test.cpp ${platform_test_additions})
+target_link_libraries (qpid-latency-test qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(qpid-latency-test)
+
+add_executable (qpid-client-test qpid-client-test.cpp ${platform_test_additions})
+target_link_libraries (qpid-client-test qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(qpid-client-test)
+
+add_executable (qpid-ping qpid-ping.cpp ${platform_test_additions})
+target_link_libraries (qpid-ping qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(qpid-ping)
+
+add_executable (qpid-receive qpid-receive.cpp Statistics.cpp ${platform_test_additions})
+target_link_libraries (qpid-receive qpidmessaging qpidtypes qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(qpid-receive)
+
+add_executable (qpid-send qpid-send.cpp Statistics.cpp ${platform_test_additions})
+target_link_libraries (qpid-send qpidmessaging qpidtypes qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(qpid-send)
+
+add_executable (qpid-topic-listener qpid-topic-listener.cpp ${platform_test_additions})
+target_link_libraries (qpid-topic-listener qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(qpid-topic-listener)
+
+add_executable (qpid-topic-publisher qpid-topic-publisher.cpp ${platform_test_additions})
+target_link_libraries (qpid-topic-publisher qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(qpid-topic-publisher)
+
+add_executable (receiver receiver.cpp ${platform_test_additions})
+target_link_libraries (receiver qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(receiver)
+
+# This is bizarre - using both messaging and client libraries
+add_executable (sender sender.cpp Statistics.cpp ${platform_test_additions})
+target_link_libraries (sender qpidmessaging qpidtypes qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+remember_location(sender)
+
+add_executable (qpid-txtest qpid-txtest.cpp ${platform_test_additions})
+target_link_libraries (qpid-txtest qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
+#qpid_txtest_SOURCES=qpid-txtest.cpp  TestOptions.h ConnectionOptions.h
+remember_location(qpid-txtest)
+
+install (TARGETS
+         qpid-perftest qpid-latency-test qpid-client-test
+         qpid-ping
+         qpid-receive qpid-send qpid-topic-listener qpid-topic-publisher receiver sender
+         qpid-txtest
+         RUNTIME DESTINATION ${QPID_INSTALL_TESTDIR})
+install (PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/qpidt
+         DESTINATION ${QPID_INSTALL_TESTDIR})
+
+# Only build test code if testing is turned on
+if (BUILD_TESTING)
+
+# Create the environment scripts for tests
+set (abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
+set (abs_builddir ${CMAKE_CURRENT_BINARY_DIR})
+set (abs_top_srcdir ${CMAKE_SOURCE_DIR})
+set (abs_top_builddir ${CMAKE_BINARY_DIR})
+set (builddir_lib_suffix "")
+
+if (CMAKE_SYSTEM_NAME STREQUAL Windows)
+  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/test_env.ps1.in
+    ${CMAKE_CURRENT_BINARY_DIR}/test_env.ps1 @ONLY)
+else (CMAKE_SYSTEM_NAME STREQUAL Windows)
+  configure_file (${CMAKE_CURRENT_SOURCE_DIR}/test_env.sh.in
+    ${CMAKE_CURRENT_BINARY_DIR}/test_env.sh @ONLY)
+endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
+
+# Copy qpidd-p0 script to build directory so tests can find it.
+configure_file (${CMAKE_CURRENT_SOURCE_DIR}/qpidd-p0 ${CMAKE_CURRENT_BINARY_DIR} COPYONLY)
+
+# Like this to work with cmake 2.4 on Unix
+set (qpid_test_boost_libs 
+     ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SYSTEM_LIBRARY})
+
 #
 # Unit test program
 #
@@ -190,41 +232,11 @@ endif (BUILD_SASL)
 #
 # Other test programs
 #
-add_executable (qpid-perftest qpid-perftest.cpp ${platform_test_additions})
-target_link_libraries (qpid-perftest qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-#qpid_perftest_SOURCES=qpid-perftest.cpp test_tools.h TestOptions.h ConnectionOptions.h
-remember_location(qpid-perftest)
-
-add_executable (qpid-txtest qpid-txtest.cpp ${platform_test_additions})
-target_link_libraries (qpid-txtest qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-#qpid_txtest_SOURCES=qpid-txtest.cpp  TestOptions.h ConnectionOptions.h
-remember_location(qpid-txtest)
-
-add_executable (qpid-latency-test qpid-latency-test.cpp ${platform_test_additions})
-target_link_libraries (qpid-latency-test qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-#qpid_latencytest_SOURCES=qpid-latency-test.cpp TestOptions.h ConnectionOptions.h
-remember_location(qpid-latency-test)
-
 add_executable (echotest echotest.cpp ${platform_test_additions})
 target_link_libraries (echotest qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
 #echotest_SOURCES=echotest.cpp TestOptions.h ConnectionOptions.h
 remember_location(echotest)
 
-add_executable (qpid-client-test qpid-client-test.cpp ${platform_test_additions})
-target_link_libraries (qpid-client-test qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-#qpid_client_test_SOURCES=qpid-client-test.cpp TestOptions.h ConnectionOptions.h
-remember_location(qpid-client-test)
-
-add_executable (qpid-topic-listener qpid-topic-listener.cpp ${platform_test_additions})
-target_link_libraries (qpid-topic-listener qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-#qpid_topic_listener_SOURCES=qpid-topic-listener.cpp TestOptions.h ConnectionOptions.h
-remember_location(qpid-topic-listener)
-
-add_executable (qpid-topic-publisher qpid-topic-publisher.cpp ${platform_test_additions})
-target_link_libraries (qpid-topic-publisher qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-#qpid_topic_publisher_SOURCES=qpid-topic-publisher.cpp TestOptions.h ConnectionOptions.h
-remember_location(qpid-topic-publisher)
-
 add_executable (publish publish.cpp ${platform_test_additions})
 target_link_libraries (publish qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
 #publish_SOURCES=publish.cpp TestOptions.h ConnectionOptions.h
@@ -262,27 +274,6 @@ target_link_libraries (txjob qpidclient 
 #txjob_SOURCES=txjob.cpp  TestOptions.h ConnectionOptions.h
 remember_location(txjob)
 
-add_executable (receiver receiver.cpp ${platform_test_additions})
-target_link_libraries (receiver qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-remember_location(receiver)
-
-# This is bizarre - using both messaging and client libraries
-add_executable (sender sender.cpp Statistics.cpp ${platform_test_additions})
-target_link_libraries (sender qpidmessaging qpidtypes qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-remember_location(sender)
-
-add_executable (qpid-receive qpid-receive.cpp Statistics.cpp ${platform_test_additions})
-target_link_libraries (qpid-receive qpidmessaging qpidtypes qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-remember_location(qpid-receive)
-
-add_executable (qpid-send qpid-send.cpp Statistics.cpp ${platform_test_additions})
-target_link_libraries (qpid-send qpidmessaging qpidtypes qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-remember_location(qpid-send)
-
-add_executable (qpid-ping qpid-ping.cpp ${platform_test_additions})
-target_link_libraries (qpid-ping qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
-remember_location(qpid-ping)
-
 add_executable (datagen datagen.cpp ${platform_test_additions})
 target_link_libraries (datagen qpidclient qpidcommon "${Boost_PROGRAM_OPTIONS_LIBRARY}")
 remember_location(datagen)
@@ -296,16 +287,6 @@ if (BUILD_SASL)
     remember_location(sasl_version)
 endif (BUILD_SASL)
 
-# qpid-perftest and qpid-latency-test are generally useful so install them
-install (TARGETS
-         qpid-perftest qpid-latency-test qpid-client-test
-         qpid-ping
-         qpid-receive qpid-send qpid-topic-listener qpid-topic-publisher receiver sender
-         qpid-txtest
-         RUNTIME DESTINATION ${QPID_INSTALL_TESTDIR})
-install (PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/qpidt
-         DESTINATION ${QPID_INSTALL_TESTDIR})
-
 # This should ideally be done as part of the test run, but I don't know a way
 # to get these arguments and the working directory set like Makefile.am does,
 # and have that run during the test pass.
@@ -351,10 +332,10 @@ if (PYTHON_EXECUTABLE)
 endif (PYTHON_EXECUTABLE)
 add_test (stop_broker ${test_wrap} ${CMAKE_CURRENT_SOURCE_DIR}/stop_broker${test_script_suffix})
 if (PYTHON_EXECUTABLE)
-  add_test (ha_tests ${test_wrap} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/ha_tests.py)
-  add_test (qpidd_qmfv2_tests ${test_wrap} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/qpidd_qmfv2_tests.py)
+  add_test (ha_tests ${test_wrap} ${CMAKE_CURRENT_SOURCE_DIR}/ha_tests.py)
+  add_test (qpidd_qmfv2_tests ${test_wrap} ${CMAKE_CURRENT_SOURCE_DIR}/qpidd_qmfv2_tests.py)
   if (BUILD_AMQP)
-    add_test (interlink_tests ${test_wrap} ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/interlink_tests.py)
+    add_test (interlink_tests ${test_wrap} ${CMAKE_CURRENT_SOURCE_DIR}/interlink_tests.py)
   endif (BUILD_AMQP)
   add_test (swig_python_tests ${test_wrap} ${CMAKE_CURRENT_SOURCE_DIR}/swig_python_tests${test_script_suffix})
 endif (PYTHON_EXECUTABLE)
@@ -380,5 +361,6 @@ add_library(test_store MODULE test_store
 target_link_libraries (test_store qpidbroker qpidcommon)
 set_target_properties (test_store PROPERTIES PREFIX "" COMPILE_DEFINITIONS _IN_QPID_BROKER)
 
-
 add_library (dlclose_noop MODULE dlclose_noop.c)
+
+endif (BUILD_TESTING)

Modified: qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt?rev=1535398&r1=1535397&r2=1535398&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt (original)
+++ qpid/trunk/qpid/cpp/src/tests/legacystore/CMakeLists.txt Thu Oct 24 15:00:11 2013
@@ -17,13 +17,10 @@
 # under the License.
 #
 
-if(BUILD_LEGACYSTORE)
+if(BUILD_LEGACYSTORE AND BUILD_TESTING)
 
 message(STATUS "Building legacystore tests")
 
-# Enable dashboard reporting.
-include (CTest)
-
 # Make sure that everything get built before the tests
 # Need to create a var with all the necessary top level targets
 
@@ -34,42 +31,11 @@ endif (QPID_LINK_BOOST_DYNAMIC)
 
 include_directories( ${CMAKE_CURRENT_SOURCE_DIR} )
 
-include (FindPythonInterp)
-
-# # Inherit environment from parent script
-# set (abs_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
-# set (abs_builddir ${CMAKE_CURRENT_BINARY_DIR})
-# set (abs_top_srcdir ${CMAKE_SOURCE_DIR})
-# set (abs_top_builddir ${CMAKE_BINARY_DIR})
-# set (builddir_lib_suffix "")
-
-# 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")
-endif (ENABLE_VALGRIND)
-
 # Like this to work with cmake 2.4 on Unix
 set (qpid_test_boost_libs
      ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY} ${Boost_SYSTEM_LIBRARY})
 
 #
-# Unit test program
-#
-# Unit tests are built as a single program to reduce valgrind overhead
-# when running the tests. If you want to build a subset of the tests run
-# ccmake and set unit_tests_to_build to the set you want to build.
-# HACK ALERT - Unit tests are built individually to resolve a conflict
-# with running multiple brokers that connect to 0.0.0.0:5672 and that
-# womp on each other's store directory.
-
-#
 # define_legacystore_test
 # macro to accept the name of a single source file and to create a
 #  unit test executable that runs the source.
@@ -185,4 +151,4 @@ add_test(NAME journal_jtt_ut WORKING_DIR
 
 add_test (legacystore_python_tests ${shell} ${CMAKE_CURRENT_SOURCE_DIR}/run_python_tests${test_script_suffix})
 
-endif (BUILD_LEGACYSTORE)
+endif (BUILD_LEGACYSTORE AND BUILD_TESTING)

Modified: qpid/trunk/qpid/cpp/src/tests/run_test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/run_test?rev=1535398&r1=1535397&r2=1535398&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/run_test (original)
+++ qpid/trunk/qpid/cpp/src/tests/run_test Thu Oct 24 15:00:11 2013
@@ -42,13 +42,6 @@ export srcdir
 test -s qpidd.port && QPID_PORT=`cat qpidd.port`
 export QPID_PORT
 
-# Avoid silly libtool error messages if these are not defined
-test -z "$LC_ALL" && LC_ALL=
-test -z "$LC_CTYPE" && LC_CTYPE=
-test -z "$LC_COLLATE" && LC_COLLATE=
-test -z "$LC_MESSAGES" && LC_MESSAGES=
-export LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-
 VG_LOG="`basename $1`.vglog"
 rm -f $VG_LOG*
 
@@ -61,21 +54,19 @@ VALGRIND_OPTS="$VALGRIND_OPTS
 --log-file=$VG_LOG --
 "
 ERROR=0
-if grep -l "^# Generated by .*libtool" "$1" >/dev/null 2>&1; then
-    # This is a libtool "executable". Valgrind it if VALGRIND specified.
-    test -n "$VALGRIND" && VALGRIND="$VALGRIND $VALGRIND_OPTS"
-    # Hide output unless there's an error.
-    $LIBTOOL --mode=execute $VALGRIND "$@" 2>&1 || ERROR=1
-    test -n "$VALGRIND" && { vg_check $VG_LOG* || ERROR=1 ; }
+if [ ! -x $1 ] ; then
+    echo "Cannot execute $1"
+    ERROR=1
 elif file $1 | grep -q text; then
-    # This is a non-libtool shell script, just execute it.
+    # This is a shell script, just execute it.
     exec "$@"
-else
+elif [ -n "$VALGRIND" ] ; then
     # This is a real executable, valgrind it.
-    test -n "$VALGRIND" && VALGRIND="$VALGRIND $VALGRIND_OPTS"
     # Hide output unless there's an error.
-    $VALGRIND "$@" 2>&1 || ERROR=1
-    test -n "$VALGRIND" && { vg_check $VG_LOG* || ERROR=1 ; }
+    $VALGRIND $VALGRIND_OPTS "$@" 2>&1 || ERROR=1
+    vg_check $VG_LOG* || ERROR=1
+else
+    "$@" 2>&1 || ERROR=1
 fi
 
 exit $ERROR

Modified: qpid/trunk/qpid/cpp/src/tests/test_env.sh.in
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/test_env.sh.in?rev=1535398&r1=1535397&r2=1535398&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/test_env.sh.in (original)
+++ qpid/trunk/qpid/cpp/src/tests/test_env.sh.in Thu Oct 24 15:00:11 2013
@@ -19,7 +19,7 @@
 
 absdir() { echo `cd $1 && pwd`; }
 
-# Environment variables substituted by configure/cmake.
+# Environment variables substituted by cmake.
 srcdir=`absdir @abs_srcdir@`
 builddir=`absdir @abs_builddir@`
 top_srcdir=`absdir @abs_top_srcdir@`
@@ -30,6 +30,12 @@ pythonswiglibdir=$top_builddir/bindings/
 testmoduledir=$builddir@builddir_lib_suffix@
 export QPID_INSTALL_PREFIX=@prefix@
 
+# Tools substituted by cmake
+enable_valgrind=${enable_valgrind-@ENABLE_VALGRIND@}
+if [ "$enable_valgrind" = "ON" ] ; then
+    export VALGRIND=@VALGRIND_EXECUTABLE@
+fi
+
 # Python paths and directories
 export PYTHON_DIR=$builddir/python
 export QPID_PYTHON_TEST=$PYTHON_DIR/commands/qpid-python-test



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org