summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSenko Rasic <senko.rasic@dobarkod.hr>2011-08-19 12:40:23 (GMT)
committerSenko Rasic <senko.rasic@dobarkod.hr>2011-08-19 12:40:23 (GMT)
commit4b154dece781a6f66f3f7c9f8fc91c604bb70da5 (patch)
tree89278c465ee7dc101540d9ed3066330719654a8a
parent950306e03a0bddcd54cb9d58e2296dbb86ddeac4 (diff)
downloadgst-qa-system-4b154dece781a6f66f3f7c9f8fc91c604bb70da5.tar.gz
gst-qa-system-4b154dece781a6f66f3f7c9f8fc91c604bb70da5.tar.xz
web runner: monkeypatch insanity to be able to quit even if no tests are running
Insanity proper doesn't assume it's staying around after the tests are done, so it won't quit unless it's in the middle of a test run. This isn't neccessarily true when the web service is used.
-rw-r--r--web/insanityweb/runner.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/web/insanityweb/runner.py b/web/insanityweb/runner.py
index 9e78e9d..b3d6a44 100644
--- a/web/insanityweb/runner.py
+++ b/web/insanityweb/runner.py
@@ -32,6 +32,20 @@ class Client(TesterClient):
except Exception, e:
debug("Exception while aborting the current test: " + str(e))
+ def quit(self):
+ """
+ Quit the client
+ """
+ debug("Quitting...")
+
+ if self._running:
+ self.stop()
+
+ try:
+ self._storage.close(self._exit)
+ except:
+ self._exit()
+
def clearTestRuns(self):
if self._running:
self.stop()