From 5c1d198f58ada0c38de8805b6933839c1b5e02ee Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Sat, 22 Nov 2014 14:40:29 -0800 Subject: 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 Acked-by: Dylan Baker Acked-by: Matt Turner Acked-by: Jason Ekstrand --- framework/log.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'framework/log.py') 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) -- cgit v1.2.3