summaryrefslogtreecommitdiff
path: root/tools/autopilot
diff options
authorThomi Richards <thomi.richards@canonical.com>2012-03-03 09:58:19 +1300
committerThomi Richards <thomi.richards@canonical.com>2012-03-03 09:58:19 +1300
commitaac0d67d954e1abc49cf0b5ade13375e614ce951 (patch)
tree5083faf6bd98d37f981daf391c7a31f0d628a472 /tools/autopilot
parent40f3d95263bc6c65b3d1722edbe62f745c78e5a3 (diff)
autopilot script prints total number of tests after listing them.
(bzr r2047.2.1)
Diffstat (limited to 'tools/autopilot')
-rwxr-xr-xtools/autopilot6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/autopilot b/tools/autopilot
index bf4013a50..d5f933919 100755
--- a/tools/autopilot
+++ b/tools/autopilot
@@ -85,6 +85,7 @@ def parse_arguments():
def list_tests():
"""Print a list of tests we find inside autopilot.tests."""
+ num_tests = 0
from testtools import iterate_tests
loader = TestLoader()
test_suite = loader.discover('autopilot.tests')
@@ -93,9 +94,12 @@ def list_tests():
for test in iterate_tests(test_suite):
has_scenarios = hasattr(test, "scenarios")
if has_scenarios:
- print " * " + test.id()
+ num_tests += len(test.scenarios)
+ print " *%d %s" % (len(test.scenarios), test.id())
else:
+ num_tests += 1
print test.id()
+ print "\n %d total tests." % (num_tests)
def run_tests(args):