test: print the layout-tester progress bar to stdout by default

tqdm prints to stderr by default but we're using that for failed keymap
compiles (which are the ones that really matter). Plus, whether we're using tqdm
is dependent on isatty(sys.stdout) anyway.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
master
Peter Hutterer 2021-04-16 09:24:20 +10:00 committed by Ran Benita
parent efa5805032
commit be520ef91c
1 changed files with 2 additions and 2 deletions

View File

@ -23,7 +23,7 @@ def escape(s):
# The function generating the progress bar (if any). # The function generating the progress bar (if any).
def create_progress_bar(verbose): def create_progress_bar(verbose):
def noop_progress_bar(x, total): def noop_progress_bar(x, total, file=None):
return x return x
progress_bar = noop_progress_bar progress_bar = noop_progress_bar
@ -211,7 +211,7 @@ def run(combos, tool, njobs, keymap_output_dir):
failed = False failed = False
with multiprocessing.Pool(njobs) as p: with multiprocessing.Pool(njobs) as p:
results = p.imap_unordered(tool, combos) results = p.imap_unordered(tool, combos)
for invocation in progress_bar(results, total=len(combos)): for invocation in progress_bar(results, total=len(combos), file=sys.stdout):
if invocation.exitstatus != 0: if invocation.exitstatus != 0:
failed = True failed = True
target = sys.stderr target = sys.stderr