diff options
author | Lars Wirzenius <liw@liw.fi> | 2014-01-21 09:55:24 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2014-01-21 09:55:24 +0000 |
commit | 099c7d84298c12db09979903720fa44c615e1f7b (patch) | |
tree | 3586516e11e2ae8cdb34f41efcf81096c524395f | |
parent | 9800dff2f907cd4b5d2bf70bf66eca42aee7d658 (diff) | |
download | cmdtest-099c7d84298c12db09979903720fa44c615e1f7b.tar.gz |
Make step progress reporting nicer
A count of all steps is nicer than separate scenario/step counts.
-rwxr-xr-x | yarn | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -109,9 +109,9 @@ class YarnRunner(cliapp.Application): self.ts = ttystatus.TerminalStatus(period=0.001) if not self.settings['quiet'] and not self.settings['verbose']: self.ts.format( - '%ElapsedTime() %Index(scenario,scenarios): ' + '%ElapsedTime() %Index(current_step,all_steps): ' '%String(scenario_name): ' - 'step %Index(step,steps): %String(step_name)') + '%String(step_name)') scenarios, implementations = self.parse_scenarios(args) self.check_there_are_scenarios(scenarios) @@ -120,10 +120,13 @@ class YarnRunner(cliapp.Application): self.connect_implementations(scenarios, implementations) shell_prelude = self.load_shell_libraries() - self.ts['scenarios'] = scenarios - self.ts['num_scenarios'] = len(scenarios) self.info('Found %d scenarios' % len(scenarios)) + all_steps = [] + for scenario in scenarios: + all_steps.extend(scenario.steps) + self.ts['all_steps'] = all_steps + self.scenarios_run = 0 self.skipped_for_assuming = 0 self.steps_run = 0 @@ -265,13 +268,13 @@ class YarnRunner(cliapp.Application): started = time.time() self.info('Running scenario %s' % scenario.name) - 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') + for step in scenario.steps: + self.ts['current_step'] = step self.remember_scenario_timing(time.time() - started) return True @@ -372,7 +375,7 @@ class YarnRunner(cliapp.Application): started = time.time() self.info('Running step "%s %s"' % (step.what, step.text)) - self.ts['step'] = step + self.ts['current_step'] = step self.ts['step_name'] = '%s %s' % (step.what, step.text) self.steps_run += 1 |