summaryrefslogtreecommitdiffstats
path: root/tests/integration
diff options
context:
space:
mode:
authorFrederic Peters <fpeters@entrouvert.com>2008-02-25 22:20:53 +0000
committerFrederic Peters <fpeters@entrouvert.com>2008-02-25 22:20:53 +0000
commit3eca7c3fe82774ef9787aa2d6c4f4afa036d7925 (patch)
treeb4b50c8959aa677c7dc31dfe512c78ad442836b7 /tests/integration
parent24c7d38abce697d33d2e9b4b7ed1f855875728e1 (diff)
downloadlasso-3eca7c3fe82774ef9787aa2d6c4f4afa036d7925.tar.gz
lasso-3eca7c3fe82774ef9787aa2d6c4f4afa036d7925.tar.xz
lasso-3eca7c3fe82774ef9787aa2d6c4f4afa036d7925.zip
initialize twill before servers, and pass over crashed servers on cleanup
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/saml2/__init__.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/integration/saml2/__init__.py b/tests/integration/saml2/__init__.py
index 41f79377..2f427932 100644
--- a/tests/integration/saml2/__init__.py
+++ b/tests/integration/saml2/__init__.py
@@ -24,6 +24,9 @@ def setup():
print >> sys.stderr, 'Create it or edit tests/config.py to match your local installation'
sys.exit(1)
+ twill.commands.reset_browser()
+ twill.set_output(file('/dev/null', 'w'))
+
os.mkdir('/tmp/.tests')
sp = subprocess.Popen([AUTHENTICCTL, 'start',
'--app-dir', '/tmp/.tests/authentictests',
@@ -39,12 +42,12 @@ def setup():
time.sleep(2) # let process bind ports
- twill.commands.reset_browser()
- twill.set_output(file('/dev/null', 'w'))
-
def teardown():
for pid in pids:
- os.kill(pid, signal.SIGTERM)
+ try:
+ os.kill(pid, signal.SIGTERM)
+ except OSError:
+ print >> sys.stderr, 'failed to kill pid %s' % pid
os.system('rm -rf /tmp/.tests/')