summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/env.sh.in
blob: 7ff42df1b737bbfb6a1efc7860abd0ef71b5b570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#
# 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.
#

# Environment variables substituted by cmake

export BUILD_DIR=@CMAKE_BINARY_DIR@
export SOURCE_DIR=@CMAKE_SOURCE_DIR@

export SASLPASSWD2=@SASLPASSWD2_EXECUTABLE@
export PYTHON=@PYTHON_EXECUTABLE@

if [[ "@ENABLE_VALGRIND@" == "ON" ]]; then
    export VALGRIND=@VALGRIND_EXECUTABLE@
fi

# Python path

export PYTHONPATH=$BUILD_DIR/src/tests:$BUILD_DIR/bindings/qpid/python:$BUILD_DIR/management/python/lib:${PYTHONPATH-}

# Path

export PATH=$BUILD_DIR/src:$BUILD_DIR/src/tests:$BUILD_DIR/management/python/bin:${PATH-}

# Modules

function export_module {
    if [[ -f $BUILD_DIR/src/$2 ]]; then
	export $1=$BUILD_DIR/src/$2
    fi
}

export_module HA_LIB ha.so
export_module XML_LIB xml.so
export_module AMQP_LIB amqp.so

[[ ${STORE_LIB-} ]] || export_module STORE_LIB linearstore.so
[[ ${STORE_LIB-} ]] || export_module STORE_LIB legacystore.so

export TEST_STORE_LIB=$BUILD_DIR/src/tests/test_store.so

# Qpidd options - Eliminate

export QPID_NO_MODULE_DIR=1	# Don't accidentally load installed modules
export QPID_DATA_DIR=           # Disable persistence
export QPID_CONFIG=$SOURCE_DIR/src/tests/qpidd-empty.conf

# Options for boost test framework

[[ ${BOOST_TEST_SHOW_PROGRESS-} ]] || export BOOST_TEST_SHOW_PROGRESS=yes
[[ ${BOOST_TEST_CATCH_SYSTEM_ERRORS-} ]] || export BOOST_TEST_CATCH_SYSTEM_ERRORS=no

echo "PWD:          $PWD"
echo "SOURCE_DIR:   ${SOURCE_DIR}"
echo "BUILD_DIR:    ${BUILD_DIR}"

echo "PATH:"
echo -n "  "; echo $PATH | sed 's/:/\n  /g'

echo "PYTHONPATH:"
echo -n "  "; echo $PYTHONPATH | sed 's/:/\n  /g'