summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/run_test
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-06-27 00:12:26 +0000
committerAlan Conway <aconway@apache.org>2007-06-27 00:12:26 +0000
commit8ea91b2aa2b1a6a3fdbf47a2eb36e7c2c997bec8 (patch)
treedae0c1509b842933018f0f36d461c0c3b1d577b1 /qpid/cpp/src/tests/run_test
parenta1ac3d0a8a8464663fc105a400829b1f163681b9 (diff)
downloadqpid-python-8ea91b2aa2b1a6a3fdbf47a2eb36e7c2c997bec8.tar.gz
Make check now starts a broker on a dynamically assigned port, so
multiple qpid builds on one host will not conflict. * src/tests/run_test, start_broker, kill_broker: Broker writes port to file, run_test sets QPID_PORT in environment of all tests. * src/tests/topic_publisher.cpp, topic_listener.cpp, client_test.cpp: All test clients use TestOptions to parse options from args and env. * src/qpid/Options.h: Renamed from CommonOptions.h Simplified use of Options class. * src/qpid/Url.h: Renamed defaultPort constant. * src/tests/logging.cpp: * src/tests/interop_runner.cpp: * src/tests/TestOptions.h: * src/qpidd.cpp: * src/qpid/log/Options.cpp: * src/qpid/log/Logger.cpp: * src/qpid/broker/Broker.cpp: Updated for changes to Options. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@550993 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/run_test')
-rwxr-xr-xqpid/cpp/src/tests/run_test18
1 files changed, 12 insertions, 6 deletions
diff --git a/qpid/cpp/src/tests/run_test b/qpid/cpp/src/tests/run_test
index bfd6991481..deb22b4450 100755
--- a/qpid/cpp/src/tests/run_test
+++ b/qpid/cpp/src/tests/run_test
@@ -1,12 +1,15 @@
#!/bin/sh
#
-# Run a test executable. Output nothing if test passes,
-# show the output if it fails. Leave output in <test>.log for
-# examination.
+# Set up environment and run a test executable or script.
+#
+# Output nothing if test passes, show the output if it fails and
+# leave output in <test>.log for examination.
+#
+# If qpidd.port exists run test with QPID_PORT=`cat qpidd.port`
#
-# If $VALGRIND if is set run under valgrind. If there are
-# valgrind erros show valgrind output, also leave it in
-# <test>.valgrind for examination.
+# If $VALGRIND if is set run under valgrind. If there are valgrind
+# erros show valgrind output, also leave it in <test>.valgrind for
+# examination.
#
vg_failed() {
@@ -33,6 +36,9 @@ vg_check()
# Export variables from makefile.
export VALGRIND srcdir
+# Export QPID_PORT if qpidd.port exists.
+test -f qpidd.port && export QPID_PORT=`cat qpidd.port`
+
VG_LOG="$1.vglog"
TEST_LOG="$1.log"
rm -f $VG_LOG $TEST_LOG