diff options
author | Lars Wirzenius <liw@liw.fi> | 2013-08-02 19:21:07 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2013-08-02 19:21:07 +0100 |
commit | 0e875126d927ffd17fb714abb914c857b638ce74 (patch) | |
tree | 63ad4cbd884b4bd0a7049a2775462ee44e45575f | |
parent | 79a6709f4cc49e028fffaead40192a8bbe79f002 (diff) | |
download | cmdtest-0e875126d927ffd17fb714abb914c857b638ce74.tar.gz |
Report number of scenarios, steps actually run
-rwxr-xr-x | yarn | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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 |