Quieted test.py/bench.py status when stdout is aimed at stdout
This is a condition for specifically the -O- pattern. Doing anything fancier would be too much, so anything clever such as -O/dev/stdout will still be clobbered. This was a common enough pattern and the status updates clobbering stdout was annoying enough that I figured this warranted a special case.
This commit is contained in:
+3
-1
@@ -1140,7 +1140,9 @@ def run_stage(name, runner, bench_ids, stdout_, trace_, output_, **args):
|
|||||||
daemon=True))
|
daemon=True))
|
||||||
|
|
||||||
def print_update(done):
|
def print_update(done):
|
||||||
if not args.get('verbose') and (args['color'] or done):
|
if (not args.get('verbose')
|
||||||
|
and not args.get('stdout') == '-'
|
||||||
|
and (args['color'] or done)):
|
||||||
sys.stdout.write('%s%srunning %s%s:%s %s%s' % (
|
sys.stdout.write('%s%srunning %s%s:%s %s%s' % (
|
||||||
'\r\x1b[K' if args['color'] else '',
|
'\r\x1b[K' if args['color'] else '',
|
||||||
'\x1b[?7l' if not done else '',
|
'\x1b[?7l' if not done else '',
|
||||||
|
|||||||
+3
-1
@@ -1119,7 +1119,9 @@ def run_stage(name, runner, test_ids, stdout_, trace_, output_, **args):
|
|||||||
daemon=True))
|
daemon=True))
|
||||||
|
|
||||||
def print_update(done):
|
def print_update(done):
|
||||||
if not args.get('verbose') and (args['color'] or done):
|
if (not args.get('verbose')
|
||||||
|
and not args.get('stdout') == '-'
|
||||||
|
and (args['color'] or done)):
|
||||||
sys.stdout.write('%s%srunning %s%s:%s %s%s' % (
|
sys.stdout.write('%s%srunning %s%s:%s %s%s' % (
|
||||||
'\r\x1b[K' if args['color'] else '',
|
'\r\x1b[K' if args['color'] else '',
|
||||||
'\x1b[?7l' if not done else '',
|
'\x1b[?7l' if not done else '',
|
||||||
|
|||||||
Reference in New Issue
Block a user