summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2012-09-11 10:10:52 +0200
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2012-09-11 10:10:52 +0200
commit41cccaa8baf6970810ea406a86c04029c2230849 (patch)
treef3d62344f58fd8c3ba61ebc54a17534df23647df
parent223a234ad1b30608b122670d8504d33fd6c05d42 (diff)
Set gabble twisted location both for installed and uninstalled tests
Set GABBLE_TWISTED_PATH in the environment which points to either the installed (when using run-test.sh) or the srcdir location (when using make check)
-rw-r--r--tests/twisted/Makefile.am2
-rw-r--r--tests/twisted/run-test.sh.in3
-rw-r--r--tests/twisted/tls/server-tls-channel.py4
3 files changed, 6 insertions, 3 deletions
diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index f6e847bef..158857bb7 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -304,7 +304,7 @@ TESTS =
TESTS_ENVIRONMENT = \
PYTHONPATH=@abs_top_srcdir@/tests/twisted:@abs_top_builddir@/tests/twisted \
- GABBLE_TWISTED_SRCDIR=@srcdir@
+ GABBLE_TWISTED_PATH=@srcdir@
check-local: check-coding-style check-twisted
diff --git a/tests/twisted/run-test.sh.in b/tests/twisted/run-test.sh.in
index 6e8d57655..e6638553c 100644
--- a/tests/twisted/run-test.sh.in
+++ b/tests/twisted/run-test.sh.in
@@ -9,6 +9,9 @@ fi
PYTHONPATH=@gabbletestsdir@/twisted
export PYTHONPATH
+GABBLE_TWISTED_PATH=@gabbletestsdir@/twisted
+export GABBLE_TWISTED_PATH
+
if [ -n "$1" ] ; then
list="$1"
else
diff --git a/tests/twisted/tls/server-tls-channel.py b/tests/twisted/tls/server-tls-channel.py
index 2835ed63f..7823eacc5 100644
--- a/tests/twisted/tls/server-tls-channel.py
+++ b/tests/twisted/tls/server-tls-channel.py
@@ -34,8 +34,8 @@ JID = "test@example.org"
# the files are copied from wocky/tests/certs/tls-[cert,key].pem
CA_CERT_HOSTNAME = 'weasel-juice.org'
-CA_CERT = os.environ.get('GABBLE_TWISTED_SRCDIR', '.') + '/tls-cert.pem'
-CA_KEY = os.environ.get('GABBLE_TWISTED_SRCDIR', '.') + '/tls-key.pem'
+CA_CERT = os.environ.get('GABBLE_TWISTED_PATH', '.') + '/tls-cert.pem'
+CA_KEY = os.environ.get('GABBLE_TWISTED_PATH', '.') + '/tls-key.pem'
class TlsAuthenticator(XmppAuthenticator):
def __init__(self, username, password, resource=None):