summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2018-07-25 14:11:49 +0200
committerlouiz’ <louiz@louiz.org>2018-07-25 14:11:49 +0200
commit20f36df05fef890fdd87d1c3ddc24c4bb524ce53 (patch)
tree0e0b6f88fedd79025e233d8b7969df81a250c4c1 /tests
parent3b96b2e0b1cdd3f1a671b601833dfd5bb6bf769a (diff)
downloadbiboumi-20f36df05fef890fdd87d1c3ddc24c4bb524ce53.tar.gz
biboumi-20f36df05fef890fdd87d1c3ddc24c4bb524ce53.tar.bz2
biboumi-20f36df05fef890fdd87d1c3ddc24c4bb524ce53.tar.xz
biboumi-20f36df05fef890fdd87d1c3ddc24c4bb524ce53.zip
Add a timer for each e2e test
Diffstat (limited to 'tests')
-rw-r--r--tests/end_to_end/__main__.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py
index 1774e1e..0984df8 100644
--- a/tests/end_to_end/__main__.py
+++ b/tests/end_to_end/__main__.py
@@ -333,6 +333,8 @@ class BiboumiTest:
except FileNotFoundError:
pass
+ start_datetime = datetime.datetime.now()
+
# Start the XMPP component and biboumi
biboumi = BiboumiRunner(self.scenario.name)
xmpp = XMPPComponent(self.scenario, biboumi)
@@ -344,13 +346,16 @@ class BiboumiTest:
code = asyncio.get_event_loop().run_until_complete(biboumi.wait())
xmpp.biboumi = None
self.scenario.steps.clear()
+
+ delta = datetime.datetime.now() - start_datetime
+
failed = False
if not xmpp.failed:
if code != self.expected_code:
xmpp.error("Wrong return code from biboumi's process: %d" % (code,))
failed = True
else:
- print("Success!")
+ print("Success! ({}s)".format(round(delta.total_seconds(), 2)))
else:
failed = True