diff options
author | Kenneth Graunke <kenneth@whitecape.org> | 2014-11-22 14:40:29 -0800 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2014-12-03 16:33:16 -0800 |
commit | 5c1d198f58ada0c38de8805b6933839c1b5e02ee (patch) | |
tree | 035d2f4896510a2cc83992b9ff19a4561743fda8 | |
parent | 8eadff913452448e61c1471c528beb3750ada7ef (diff) |
framework: Make the logger print spinners instead of test numbers.
Printing out test numbers frequently exceeds the 80 character limit,
at which point the logger starts writing many copies of the progress
bar instead of overwriting it. It also prompts people to say things
like "hey, test 8423 is broken!" without realizing that tests are run
in a nondeterministic order, so the number is meaningless.
The real point was to be able to see when a thread gets stuck - i.e.
one test keeps running forever. We can easily show this with ASCII
progress spinners.
Instead of:
[16816/16822] crash: 21, fail: 82, pass: 12307, skip: 4401, warn: 5 Running Test(s): 16814 16815 16816 16817 16818 16819 16820 16821
We now get the much more compact:
[09984/16822] crash: 12, fail: 53, pass: 7314, skip: 2601, warn: 4 ||\-\|/-
v2: Drop the : before the spinners (requested by Dylan Baker).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Dylan Baker <baker.dylan.c@gmail.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Acked-by: Jason Ekstrand <jason.ekstrand@intel.com>
-rw-r--r-- | framework/log.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/log.py b/framework/log.py index caad9723a..819d2f770 100644 --- a/framework/log.py +++ b/framework/log.py @@ -149,12 +149,12 @@ class QuietLog(BaseLog): """ assert self._LOCK.locked() - out = '[{done}/{total}] {status} Running Test(s): {running}'.format( + out = '[{done}/{total}] {status} {running}'.format( done=str(self._state['complete']).zfill(self._pad), total=str(self._state['total']).zfill(self._pad), status=', '.join('{0}: {1}'.format(k, v) for k, v in sorted(self._state['summary'].iteritems())), - running=" ".join(str(x) for x in self._state['running']) + running=''.join('|/-\\'[x % 4] for x in self._state['running']) ) self._print(out) |