Author: aconway
Date: Thu Jun 26 07:55:48 2008
New Revision: 671916
URL: http://svn.apache.org/viewvc?rev=671916&view=rev
Log:
Use run_test to run valgrind for start_broker consistently with other tests.
Modified:
incubator/qpid/trunk/qpid/cpp/src/tests/run_test
incubator/qpid/trunk/qpid/cpp/src/tests/start_broker
incubator/qpid/trunk/qpid/cpp/src/tests/stop_broker
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/run_test
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/run_test?rev=671916&r1=671915&r2=671916&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/run_test (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/run_test Thu Jun 26 07:55:48 2008
@@ -29,7 +29,7 @@
test -z "$LC_MESSAGES" && LC_MESSAGES=
export LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-VG_LOG="$1.vglog"
+VG_LOG="`basename $1`.vglog"
rm -f $VG_LOG*
VALGRIND_OPTS="
@@ -46,17 +46,12 @@
# 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=$?
- test -n "$VALGRIND" && vg_check $VG_LOG*
+ libtool --mode=execute $VALGRIND "$@" 2>&1 || ERROR=1
+ test -n "$VALGRIND" && { vg_check $VG_LOG* || ERROR=1 ; }
else
# This is a non-libtool shell script, just execute it.
exec "$@"
fi
-if test -z "$ERROR"; then
- # Clean up logs if there was no error.
- rm -f $VG_LOG*
- exit 0
-else
- exit $ERROR
-fi
+exit $ERROR
+
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/start_broker
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/start_broker?rev=671916&r1=671915&r2=671916&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/start_broker (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/start_broker Thu Jun 26 07:55:48
2008
@@ -1,4 +1,4 @@
#!/bin/sh
-rm -f qpidd.vglog* qpidd.log
-test -n "$VALGRIND" && VALGRIND="$VALGRIND --log-file=qpidd.vglog --"
-exec libtool --mode=execute $VALGRIND ../qpidd --auth no --no-module-dir
--daemon --port 0 --log-output qpidd.log "$@" > qpidd.port
+# Start a test broker.
+srcdir=`dirname $0`
+exec $srcdir/run_test ../qpidd --auth=no --no-module-dir --daemon --port=0
--log-output qpidd.log "$@" > qpidd.port
Modified: incubator/qpid/trunk/qpid/cpp/src/tests/stop_broker
URL:
http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/src/tests/stop_broker?rev=671916&r1=671915&r2=671916&view=diff
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/src/tests/stop_broker (original)
+++ incubator/qpid/trunk/qpid/cpp/src/tests/stop_broker Thu Jun 26 07:55:48 2008
@@ -4,7 +4,7 @@
export QPID_PORT=`cat qpidd.port`
rm -f qpidd.port
-../qpidd --quit || ERROR=$?
+../qpidd --quit || ERROR=1
# Check qpidd.log.
grep -a 'warning\|error\|critical' qpidd.log && {
@@ -14,7 +14,7 @@
# Check valgrind log.
if test -n "$VALGRIND"; then
source `dirname $0`/vg_check $VG_LOG*
- vg_check qpidd.vglog*
+ vg_check qpidd.vglog* || ERROR=1
fi
exit $ERROR