diff options
| -rw-r--r-- | qpid/cpp/src/CMakeLists.txt | 43 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/CMakeLists.txt | 190 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/legacystore/CMakeLists.txt | 38 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/legacystore/start_broker | 25 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/legacystore/stop_broker | 46 | ||||
| -rwxr-xr-x | qpid/cpp/src/tests/run_test | 27 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/test_env.sh.in | 8 | ||||
| -rwxr-xr-x | qpid/cpp/versions | 31 |
8 files changed, 121 insertions, 287 deletions
diff --git a/qpid/cpp/src/CMakeLists.txt b/qpid/cpp/src/CMakeLists.txt index 0656c43e0d..6d05fe8165 100644 --- a/qpid/cpp/src/CMakeLists.txt +++ b/qpid/cpp/src/CMakeLists.txt @@ -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 "") diff --git a/qpid/cpp/src/tests/CMakeLists.txt b/qpid/cpp/src/tests/CMakeLists.txt index 281464e65a..114a20e96b 100644 --- a/qpid/cpp/src/tests/CMakeLists.txt +++ b/qpid/cpp/src/tests/CMakeLists.txt @@ -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 qpidcommon "${Boost_PROGRAM_OPTIONS_LIBR #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.cpp) 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) diff --git a/qpid/cpp/src/tests/legacystore/CMakeLists.txt b/qpid/cpp/src/tests/legacystore/CMakeLists.txt index 0dec2caab8..ab0eb55922 100644 --- a/qpid/cpp/src/tests/legacystore/CMakeLists.txt +++ b/qpid/cpp/src/tests/legacystore/CMakeLists.txt @@ -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_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/jrnl/ 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) diff --git a/qpid/cpp/src/tests/legacystore/start_broker b/qpid/cpp/src/tests/legacystore/start_broker deleted file mode 100644 index 30e4659030..0000000000 --- a/qpid/cpp/src/tests/legacystore/start_broker +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -QPIDD=$QPID_BLD/src/qpidd -rm -f qpidd.vglog* qpidd.log -test -n "$VALGRIND" && VALGRIND="$VALGRIND --log-file=qpidd.vglog --suppressions=$QPID_DIR/cpp/src/tests/.valgrind.supp --" -exec libtool --mode=execute $VALGRIND $QPIDD --daemon --port=0 --log-enable error+ --log-to-file qpidd.log "$@" > qpidd.port diff --git a/qpid/cpp/src/tests/legacystore/stop_broker b/qpid/cpp/src/tests/legacystore/stop_broker deleted file mode 100644 index dcefff376f..0000000000 --- a/qpid/cpp/src/tests/legacystore/stop_broker +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Stop the broker, check for errors. -# -if test -f qpidd.port; then - export QPID_PORT=`cat qpidd.port` - QPIDD=$QPID_BLD/src/qpidd - rm -f qpidd.port - - $QPIDD --quit || ERROR=$? - - # Check qpidd.log. - grep -a 'warning\|error\|critical' qpidd.log && { - echo "WARNING: Suspicious broker log entries in qpidd.log, above." - } - - # Check valgrind log. - if test -n "$VALGRIND"; then - source `dirname $0`/vg_check $VG_LOG* - vg_check qpidd.vglog* - fi - - exit $ERROR -else - echo "No qpidd.port file found - cannot stop broker." - exit 1; -fi diff --git a/qpid/cpp/src/tests/run_test b/qpid/cpp/src/tests/run_test index 6ec1fd892b..16e7362d5a 100755 --- a/qpid/cpp/src/tests/run_test +++ b/qpid/cpp/src/tests/run_test @@ -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 diff --git a/qpid/cpp/src/tests/test_env.sh.in b/qpid/cpp/src/tests/test_env.sh.in index f45d3708a2..c85e1d651a 100644 --- a/qpid/cpp/src/tests/test_env.sh.in +++ b/qpid/cpp/src/tests/test_env.sh.in @@ -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/qpid/python@builddir_lib_suffix@ 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 diff --git a/qpid/cpp/versions b/qpid/cpp/versions deleted file mode 100755 index 6f838e14b8..0000000000 --- a/qpid/cpp/versions +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/sh -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -# Utility to print out currently installed versions of qpid developer -# dependencies. Assumes that some dependencies are installed with RPM. -# - -for p in pkg-config doxygen help2man autoconf automake libtool ; do - echo `which $p` `$p --version | head -n1` -done - -for r in apr boost boost-devel cppunit cppunit-devel graphviz; do - rpm -q $r -done |
