qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1196597 - in /qpid/trunk/qpid/cpp: examples/old_api/verify examples/old_api/verify_all src/tests/test_env.sh.in
Date Wed, 02 Nov 2011 14:19:30 GMT
Author: gsim
Date: Wed Nov  2 14:19:30 2011
New Revision: 1196597

URL: http://svn.apache.org/viewvc?rev=1196597&view=rev
Log:
QPID-3573: handle case where /home/gordon does not exist

Modified:
    qpid/trunk/qpid/cpp/examples/old_api/verify
    qpid/trunk/qpid/cpp/examples/old_api/verify_all
    qpid/trunk/qpid/cpp/src/tests/test_env.sh.in

Modified: qpid/trunk/qpid/cpp/examples/old_api/verify
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/old_api/verify?rev=1196597&r1=1196596&r2=1196597&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/old_api/verify (original)
+++ qpid/trunk/qpid/cpp/examples/old_api/verify Wed Nov  2 14:19:30 2011
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -30,9 +30,16 @@ export LC_ALL=C
 # If $QPID_HOST or $QPID_PORT are set, use them to connect.
 #
 
-QPID_DATA_DIR=
 QPID_NO_MODULE_DIR=1
-export QPID_DATA_DIR QPID_NO_MODULE_DIR
+QPID_DATA_DIR=
+
+# Use temporary directory if $HOME does not exist
+if [ ! -e "$HOME" ]; then
+    QPID_DATA_DIR=/tmp/qpid
+    QPID_PID_DIR=/tmp/qpid
+fi
+
+export QPID_DATA_DIR QPID_NO_MODULE_DIR QPID_PID_DIR
 
 cleanup() {
     test -n "$QPIDD" &&  $QPIDD -q # Private broker

Modified: qpid/trunk/qpid/cpp/examples/old_api/verify_all
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/examples/old_api/verify_all?rev=1196597&r1=1196596&r2=1196597&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/examples/old_api/verify_all (original)
+++ qpid/trunk/qpid/cpp/examples/old_api/verify_all Wed Nov  2 14:19:30 2011
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 
 #
 # Licensed to the Apache Software Foundation (ASF) under one
@@ -28,6 +28,12 @@ qpidd=$topbuilddir/src/qpidd
 broker_args=$3
 exclude_regexp=$4
 
+# Use temporary directory if $HOME does not exist
+if ! test -e "$HOME"; then
+    export QPID_DATA_DIR=/tmp/qpid
+    export QPID_PID_DIR=/tmp/qpid
+fi
+
 trap "$qpidd -q" exit
 QPID_PORT=`$qpidd -dp0 $broker_args` || { echo "Can't run qpidd" ; exit 1; }
 export QPID_PORT

Modified: qpid/trunk/qpid/cpp/src/tests/test_env.sh.in
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/test_env.sh.in?rev=1196597&r1=1196596&r2=1196597&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/test_env.sh.in (original)
+++ qpid/trunk/qpid/cpp/src/tests/test_env.sh.in Wed Nov  2 14:19:30 2011
@@ -72,7 +72,13 @@ exportmodule XML_LIB xml.so
 
 # Qpid options
 export QPID_NO_MODULE_DIR=1	# Don't accidentally load installed modules
-export QPID_DATA_DIR= 		# Default to no data dir, not ~/.qpidd
+export QPID_DATA_DIR=
+
+# Use temporary directory if $HOME does not exist
+if [ ! -e "$HOME" ]; then
+    export QPID_DATA_DIR=/tmp/qpid
+    export QPID_PID_DIR=/tmp/qpid
+fi
 
 # Options for boost test framework
 export BOOST_TEST_SHOW_PROGRESS=yes



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message