diff options
author | Alan Conway <aconway@apache.org> | 2010-09-27 19:41:23 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-09-27 19:41:23 +0000 |
commit | 815420f4009fb975dd4d570f77c465dc80af7c08 (patch) | |
tree | 1f9ff69b0c3e88b3b651248086c86c816145b16a | |
parent | 4c6c970c197eb066b3474124898e94d26467a832 (diff) | |
download | qpid-python-815420f4009fb975dd4d570f77c465dc80af7c08.tar.gz |
Added install_env.sh to set environment variables to use an install prefix.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1001887 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | cpp/configure.ac | 1 | ||||
-rw-r--r-- | cpp/src/tests/Makefile.am | 7 | ||||
-rw-r--r-- | cpp/src/tests/install_env.sh.in | 26 | ||||
-rw-r--r-- | cpp/src/tests/test_env.sh.in | 8 |
4 files changed, 35 insertions, 7 deletions
diff --git a/cpp/configure.ac b/cpp/configure.ac index 60f10516f0..546dd0d280 100644 --- a/cpp/configure.ac +++ b/cpp/configure.ac @@ -539,6 +539,7 @@ AC_CONFIG_FILES([ src/Makefile src/tests/Makefile src/tests/test_env.sh + src/tests/install_env.sh src/qpid.pc docs/man/Makefile docs/api/Makefile diff --git a/cpp/src/tests/Makefile.am b/cpp/src/tests/Makefile.am index 0e61a40c29..02454971cb 100644 --- a/cpp/src/tests/Makefile.am +++ b/cpp/src/tests/Makefile.am @@ -148,8 +148,8 @@ endif # Test programs that are installed and therefore built as part of make, not make check -qpidtest_SCRIPTS += qpid-cpp-benchmark -EXTRA_DIST += qpid-cpp-benchmark +qpidtest_SCRIPTS += qpid-cpp-benchmark install_env.sh +EXTRA_DIST += qpid-cpp-benchmark install_env.sh qpidtest_PROGRAMS += receiver receiver_SOURCES = \ @@ -377,7 +377,7 @@ check-long: $(MAKE) check TESTS="$(LONG_TESTS)" VALGRIND= # Things that should be built before the check target runs. -check-am: python_prep test_env.sh sasl_config +check-am: python_prep test_env.sh install_env.sh sasl_config PYTHON_SRC_DIR=$(abs_srcdir)/../../../python PYTHON_BLD_DIR=$(abs_builddir)/python @@ -402,3 +402,4 @@ clean-local: rm -rf $(CLEAN_LOCAL) include testagent.mk + diff --git a/cpp/src/tests/install_env.sh.in b/cpp/src/tests/install_env.sh.in new file mode 100644 index 0000000000..2231954cb8 --- /dev/null +++ b/cpp/src/tests/install_env.sh.in @@ -0,0 +1,26 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# + +absdir() { echo `cd $1 && pwd`; } + +prefix=`absdir @prefix@` +export QPID_INSTALL_PREFIX=$prefix +export PATH=$prefix/bin:$prefix/sbin:$prefix/libexec/qpid/tests:$PATH +export LD_LIBRARY_PATH=$prefix/lib:$LD_LIBRARY_PATH +export PYTHONPATH=$prefix/lib/python2.4/site-packages:$PYTHONPATH diff --git a/cpp/src/tests/test_env.sh.in b/cpp/src/tests/test_env.sh.in index 07bd4b2bee..5841e910a0 100644 --- a/cpp/src/tests/test_env.sh.in +++ b/cpp/src/tests/test_env.sh.in @@ -20,10 +20,10 @@ absdir() { echo `cd $1 && pwd`; } # Environment variables substituted by configure/cmake. -srcdir=@abs_srcdir@ -builddir=@abs_builddir@ -top_srcdir=@abs_top_srcdir@ -top_builddir=@abs_top_builddir@ +srcdir=`absdir @abs_srcdir@` +builddir=`absdir @abs_builddir@` +top_srcdir=`absdir @abs_top_srcdir@` +top_builddir=`absdir @abs_top_builddir@` moduledir=$top_builddir/src@builddir_lib_suffix@ testmoduledir=$builddir@builddir_lib_suffix@ |