From 0e875126d927ffd17fb714abb914c857b638ce74 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 2 Aug 2013 19:21:07 +0100 Subject: Report number of scenarios, steps actually run --- yarn | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/yarn b/yarn index 202d726..2d9f52b 100755 --- a/yarn +++ b/yarn @@ -111,6 +111,9 @@ class YarnRunner(cliapp.Application): self.ts['num_scenarios'] = len(scenarios) self.info('Found %d scenarios' % len(scenarios)) + self.scenarios_run = 0 + self.steps_run = 0 + start_time = time.time() failed_scenarios = [] for scenario in self.select_scenarios(scenarios): @@ -128,9 +131,10 @@ class YarnRunner(cliapp.Application): if not self.settings['quiet']: print ( - 'Scenario test suite PASS, with %d scenarios, ' + 'Scenario test suite PASS, with %d scenarios ' + '(%d total steps), ' 'in %.1f seconds' % - (len(scenarios), duration)) + (self.scenarios_run, self.steps_run, duration)) def parse_scenarios(self, filenames): mdparser = yarnlib.MarkdownParser() @@ -210,6 +214,7 @@ class YarnRunner(cliapp.Application): self.ts['scenario'] = scenario self.ts['scenario_name'] = scenario.name self.ts['steps'] = scenario.steps + self.scenarios_run += 1 if self.settings['no-act']: self.info('Pretending everything went OK') @@ -296,6 +301,7 @@ class YarnRunner(cliapp.Application): self.info('Running step "%s %s"' % (step.what, step.text)) self.ts['step'] = step self.ts['step_name'] = '%s %s' % (step.what, step.text) + self.steps_run += 1 m = re.match(step.implementation.regexp, step.text) assert m is not None -- cgit v1.2.1