summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2009-02-18 10:15:52 -0600
committerJonathon Jongsma <jonathon.jongsma@collabora.co.uk>2009-02-18 10:26:11 -0600
commit510dc386b32adc28fc8309c538c083c413b9e09b (patch)
tree9e974759fcd12867a0b3ff9c838f20d2ae681fd7
parent4fb27c730a15b5d37ba6ce9769c71d720896af1b (diff)
Fix builddir!=srcdir issues
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
-rw-r--r--tests/twisted/Makefile.am5
-rw-r--r--tests/twisted/idletest.py5
-rw-r--r--tests/twisted/tools/Makefile.am2
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 = \