summaryrefslogtreecommitdiff
path: root/cpp/tests/env
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/tests/env')
-rwxr-xr-xcpp/tests/env23
1 files changed, 23 insertions, 0 deletions
diff --git a/cpp/tests/env b/cpp/tests/env
new file mode 100755
index 0000000000..76797b1ef7
--- /dev/null
+++ b/cpp/tests/env
@@ -0,0 +1,23 @@
+#!/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/test/bin
+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
+
+