summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/legacystore
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2013-10-24 15:00:11 +0000
committerAndrew Stitcher <astitcher@apache.org>2013-10-24 15:00:11 +0000
commit96cb698658efdadeaa97b6f896d270fc04330822 (patch)
tree71b07c8e906b3808fa848def0f52117b6386feee /qpid/cpp/src/tests/legacystore
parent9dffceae68b8d8bc36a2de08abcbd8554db3e309 (diff)
downloadqpid-python-96cb698658efdadeaa97b6f896d270fc04330822.tar.gz
QPID-4927: Get cmake testing working with valgrind
[also remove unused files] git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1535398 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/legacystore')
-rw-r--r--qpid/cpp/src/tests/legacystore/CMakeLists.txt38
-rw-r--r--qpid/cpp/src/tests/legacystore/start_broker25
-rw-r--r--qpid/cpp/src/tests/legacystore/stop_broker46
3 files changed, 2 insertions, 107 deletions
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