diff options
author | Benoit Foucher <benoit@zeroc.com> | 2017-01-06 14:43:00 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2017-01-06 14:43:00 +0100 |
commit | 8fd982b7d2b98b813465b21700be68c59c07f3d9 (patch) | |
tree | 03aede76927c05790d182c16c63262a315f0250c /scripts/LocalDriver.py | |
parent | Fixed ICE-7487 - C# AMI failure (diff) | |
download | ice-8fd982b7d2b98b813465b21700be68c59c07f3d9.tar.bz2 ice-8fd982b7d2b98b813465b21700be68c59c07f3d9.tar.xz ice-8fd982b7d2b98b813465b21700be68c59c07f3d9.zip |
Added --show-durations to allTests.py
Diffstat (limited to 'scripts/LocalDriver.py')
-rw-r--r-- | scripts/LocalDriver.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/scripts/LocalDriver.py b/scripts/LocalDriver.py index 3219529b406..e436e8435f0 100644 --- a/scripts/LocalDriver.py +++ b/scripts/LocalDriver.py @@ -293,7 +293,7 @@ class LocalDriver(Driver): @classmethod def getOptions(self): return ("", ["cross=", "workers=", "continue", "loop", "start=", "all", "all-cross", "host=", - "client=", "server="]) + "client=", "server=", "show-durations"]) @classmethod def usage(self): @@ -308,6 +308,7 @@ class LocalDriver(Driver): print("--all-cross Run all sensible permutations of cross language tests.") print("--client=<proxy> The endpoint of the controller to run the client side.") print("--server=<proxy> The endpoint of the controller to run the server side.") + print("--show-durations Print out the duration of each tests.") def __init__(self, options, *args, **kargs): Driver.__init__(self, options, *args, **kargs) @@ -319,6 +320,7 @@ class LocalDriver(Driver): self.loop = False self.start = 0 self.all = False + self.showDurations = False self.clientCtlPrx = "" self.serverCtlPrx = "" @@ -327,7 +329,8 @@ class LocalDriver(Driver): "l" : "loop", "all-cross" : "allCross", "client" : "clientCtlPrx", - "server" : "serverCtlPrx" }) + "server" : "serverCtlPrx", + "show-durations" : "showDurations" }) if self.cross: self.cross = Mapping.getByName(self.cross) @@ -393,6 +396,11 @@ class LocalDriver(Driver): print("Ran {0} tests in {1} minutes {2:02.2f} seconds".format(len(results), m, s)) else: print("Ran {0} tests in {1:02.2f} seconds".format(len(results), s)) + + if self.showDurations: + for r in sorted(results, key = lambda r : r.getDuration()): + print("- {0} took {1:02.2f} seconds".format(r.testsuite, r.getDuration())) + if len(failures) > 0: print("{0} succeeded and {1} failed:".format(len(results) - len(failures), len(failures))) for r in failures: |