diff options
| author | Alan Conway <aconway@apache.org> | 2006-12-21 16:48:18 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2006-12-21 16:48:18 +0000 |
| commit | 7699e10d9f3a4d06987d81ed5b9e44d2b3ceda04 (patch) | |
| tree | a450e845af6cd99ce0536f25cd17ab67e83ab578 /cpp | |
| parent | b7796ee265b7835e2c835b8374c9b2f06fc39471 (diff) | |
| download | qpid-python-7699e10d9f3a4d06987d81ed5b9e44d2b3ceda04.tar.gz | |
cpp/tests: remmoved redundant scripts, get topictest running in VPATH build.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/event-queue-2006-12-20@489404 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
| -rw-r--r-- | cpp/tests/Makefile.am | 4 | ||||
| -rwxr-xr-x | cpp/tests/broker | 45 | ||||
| -rwxr-xr-x | cpp/tests/env | 23 | ||||
| -rwxr-xr-x | cpp/tests/run-system-tests | 4 | ||||
| -rwxr-xr-x | cpp/tests/topicall | 25 |
5 files changed, 2 insertions, 99 deletions
diff --git a/cpp/tests/Makefile.am b/cpp/tests/Makefile.am index 943afde228..5e02007207 100644 --- a/cpp/tests/Makefile.am +++ b/cpp/tests/Makefile.am @@ -9,11 +9,7 @@ INCLUDES = \ -I$(top_srcdir)/lib/common/framing \ $(APR_CXXFLAGS) -# FIXME: have e.g., topicall, run as part of "make check"? EXTRA_DIST = \ - env \ - broker \ - topicall \ topictest \ qpid_test_plugin.h \ MockSessionHandler.h diff --git a/cpp/tests/broker b/cpp/tests/broker deleted file mode 100755 index c49e967466..0000000000 --- a/cpp/tests/broker +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh -. `dirname $0`/env - -brokerpid() { - netstat -tpl 2> /dev/null | awk '/amqp/ {print gensub("/.*$","","g",$7) }' -} - -killbroker () { - PID=`brokerpid` - if [ -n "$PID" ] ; then kill $PID ; fi - for ((i=5;i--;)) { - if [ -z "`brokerpid`" ] ; then exit 0 ; fi - sleep 1 - } - echo "Broker `brokerpid` refuses to die." -} - -waitbroker () { - while [ -z `brokerpid` ] ; do sleep 1 ; done -} - -startbroker() { - case $1 in - j) - export AMQJ_LOGGING_LEVEL=fatal - export JDPA_OPTS= - export QPID_OPTS=-Xmx1024M - export debug=1 - CMD="qpid-server" - qpid-run -run:print-command # Show the command line. - ;; - c) CMD=qpidd ;; - esac - nohup $CMD > /dev/null 2>&1 & - waitbroker - echo Broker started: $CMD -} - - -case $1 in - j|c) startbroker $1 ;; - stop|kill) killbroker ;; - wait) waitbroker ;; - pid) brokerpid ;; -esac diff --git a/cpp/tests/env b/cpp/tests/env deleted file mode 100755 index 49201c01fd..0000000000 --- a/cpp/tests/env +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -# Set environment variables for test scripts. - -pathmunge () { - if ! echo $PATH | /bin/egrep -q "(^|:)$1($|:)" ; then - if [ "$2" = "after" ] ; then - PATH=$PATH:$1 - else - PATH=$1:$PATH - fi - fi -} - -if [ -z QPID_ROOT ] ; then echo "You must set QPID_ROOT" ; fi - -pathmunge $QPID_ROOT/cpp/tests -# pathmunge $QPID_ROOT/cpp/build/*/bin -# pathmunge $QPID_ROOT/cpp/build/*/test - -export QPID_HOME=${QPID_HOME:-$QPID_ROOT/java/build} -pathmunge $QPID_HOME/bin - - diff --git a/cpp/tests/run-system-tests b/cpp/tests/run-system-tests index d9b5431845..5435297b45 100755 --- a/cpp/tests/run-system-tests +++ b/cpp/tests/run-system-tests @@ -6,7 +6,7 @@ log=`pwd`/qpidd.log ../src/qpidd > $log 2>&1 & pid=$! # Arrange to kill the daemon upon any type of termination. -trap 'status=$?; kill $pid; exit $status' 0 +trap 'status=$?; kill $pid; rm -f test.out; exit $status' 0 trap '(exit $?); exit $?' 1 2 13 15 # Run C++ client tests. @@ -24,7 +24,7 @@ run_test() { } run_test ./client_test -run_test ./topictest -s2 -m2 -b1 +run_test `dirname $0`/topictest -s2 -m2 -b1 # Run the python tests. if test -d ../../python ; then diff --git a/cpp/tests/topicall b/cpp/tests/topicall deleted file mode 100755 index bde04a5b30..0000000000 --- a/cpp/tests/topicall +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh -# Do 3 runs of topictests for C++ and Java brokers with reduced output. - -. `dirname $0`/env - -# Run a short topictest to warm up the broker and iron out startup effects. -flush() { - topic_listener >/dev/null 2>&1 & - topic_publisher >/dev/null 2>&1 -} - -echo Java broker -broker j ; flush -topictest c | tail -n1 -topictest c | tail -n1 -topictest c | tail -n1 - -echo C++ broker -broker c ; flush -topictest c | tail -n1 -topictest c | tail -n1 -topictest c | tail -n1 - -# Don't bother with java clients we know they're slower. - |
