From f586260a2d7f8304e1c0f48c127836bd9ea0b471 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 24 Feb 2012 14:30:49 +0000 Subject: Fix progress reporting counter --- cmdtest | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/cmdtest b/cmdtest index bf21f6f..42927e3 100755 --- a/cmdtest +++ b/cmdtest @@ -54,14 +54,13 @@ class CommandTester(cliapp.Application): self.settings.boolean(['keep', 'k'], 'keep temporary data on failure') def process_args(self, dirnames): - self.setup_ttystatus() self.timings = {} self.timings[ALL_TESTS] = {} suite_started = time.time() td = self.load_tests(dirnames) - self.ts['tests'] = td.tests + self.setup_ttystatus(td) errors = 0 self.setup_tempdir() @@ -69,7 +68,8 @@ class CommandTester(cliapp.Application): for test in td.tests: self.timings[test.name] = {} started = time.time() - self.ts['test'] = test.name + self.ts['test'] = test + self.ts['test-name'] = test.name self.run_script(test.name, td.setup) for e in self.run_test(test): logging.error(str(e)) @@ -100,9 +100,10 @@ class CommandTester(cliapp.Application): if errors: sys.exit(1) - def setup_ttystatus(self): + def setup_ttystatus(self, td): self.ts = ttystatus.TerminalStatus(period=0.001) - self.ts.format('test %Index(test,tests): %String(test)') + self.ts['tests'] = td.tests + self.ts.format('test %Index(test,tests): %String(test-name)') def load_tests(self, dirnames): td = cmdtestlib.TestDir() -- cgit v1.2.1