[telepathy-gabble-0.16] telepathy-gabble: Set gabble twisted location both for installed and uninstalled tests

Simon McVittie smcv at kemper.freedesktop.org
Tue Sep 11 04:26:47 PDT 2012


Module: telepathy-gabble
Branch: telepathy-gabble-0.16
Commit: ccc8f443c94d14d9dd94a5f4fbc84183159e8d33
URL:    http://cgit.freedesktop.org/telepathy/telepathy-gabble/commit/?id=ccc8f443c94d14d9dd94a5f4fbc84183159e8d33

Author: Sjoerd Simons <sjoerd.simons at collabora.co.uk>
Date:   Tue Sep 11 10:10:52 2012 +0200

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)

---

 tests/twisted/Makefile.am               |    2 +-
 tests/twisted/run-test.sh.in            |    3 +++
 tests/twisted/tls/server-tls-channel.py |    4 ++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index f8457f7..56d49b4 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -307,7 +307,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 6a4cc0f..311a89d 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 2835ed6..7823eac 100644
--- a/tests/twisted/tls/server-tls-channel.py
+++ b/tests/twisted/tls/server-tls-channel.py
@@ -34,8 +34,8 @@ JID = "test at 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):



More information about the telepathy-commits mailing list