[Telepathy-commits] [telepathy-idle/master] Fix builddir!=srcdir issues
Jonathon Jongsma
jonathon.jongsma at collabora.co.uk
Wed Feb 18 08:15:52 PST 2009
Some of the tests were not running properly in distcheck since I had forgotten a
couple of EXTRA_DIST incantations and was trying to load the ssl cert/key files
from the current directory rather than the src directory. The latter issue I
worked around by setting an env variable for the location of the files since I
really didn't want to do something like idletest.py.in to get autoconf to
pre-process the python source file to get the correct srcdir location
---
tests/twisted/Makefile.am | 5 ++++-
tests/twisted/idletest.py | 5 +++--
tests/twisted/tools/Makefile.am | 2 ++
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/tests/twisted/Makefile.am b/tests/twisted/Makefile.am
index f51cd0e..b2c1498 100644
--- a/tests/twisted/Makefile.am
+++ b/tests/twisted/Makefile.am
@@ -16,7 +16,9 @@ TWISTED_TESTS = \
TESTS =
TESTS_ENVIRONMENT = \
- PYTHONPATH=@abs_top_srcdir@/tests/twisted:@abs_top_builddir@/tests/twisted
+ PYTHONPATH=@abs_top_srcdir@/tests/twisted:@abs_top_builddir@/tests/twisted \
+ IDLE_SSL_KEY=@abs_top_srcdir@/tests/twisted/tools/idletest.key \
+ IDLE_SSL_CERT=@abs_top_srcdir@/tests/twisted/tools/idletest.cert
if WANT_TWISTED_TESTS
@@ -40,6 +42,7 @@ EXTRA_DIST = \
$(TWISTED_TESTS) \
servicetest.py \
idletest.py \
+ constants.py \
$(NULL)
CLEANFILES = idle-[1-9]*.log *.pyc */*.pyc
diff --git a/tests/twisted/idletest.py b/tests/twisted/idletest.py
index ab98a44..80954bc 100644
--- a/tests/twisted/idletest.py
+++ b/tests/twisted/idletest.py
@@ -104,9 +104,10 @@ class BaseIRCServer(irc.IRC):
class SSLIRCServer(BaseIRCServer):
def listen(self, port, factory):
self.log ("SSLIRCServer listening...")
+ key_file = os.environ.get('IDLE_SSL_KEY', 'tools/idletest.key')
+ cert_file = os.environ.get('IDLE_SSL_CERT', 'tools/idletest.cert')
return reactor.listenSSL(port, factory,
- ssl.DefaultOpenSSLContextFactory("tools/idletest.key",
- "tools/idletest.cert"))
+ ssl.DefaultOpenSSLContextFactory(key_file, cert_file))
def install_colourer():
def red(s):
diff --git a/tests/twisted/tools/Makefile.am b/tests/twisted/tools/Makefile.am
index bf76d55..35f8a91 100644
--- a/tests/twisted/tools/Makefile.am
+++ b/tests/twisted/tools/Makefile.am
@@ -26,6 +26,8 @@ EXTRA_DIST = \
$(service_in_files) \
$(conf_in_files) \
exec-with-log.sh.in \
+ idletest.cert \
+ idletest.key \
with-session-bus.sh
CLEANFILES = \
--
1.5.6.5
More information about the telepathy-commits
mailing list