Skip to content

Commit

Permalink
mtest: disable the progress report in gdb mode
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
bonzini committed Jan 15, 2021
1 parent c1c1408 commit 90ea0dc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions mesonbuild/mtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,7 @@ async def report_progress() -> None:

self.test_count = harness.test_count

# In verbose mode, the progress report gets in the way of the tests'
# stdout and stderr.
if self.is_tty() and not harness.options.verbose:
if self.is_tty() and not harness.need_console:
# Account for "[aa-bb/cc] OO " in the progress report
self.max_left_width = 3 * len(str(self.test_count)) + 8
self.progress_task = asyncio.ensure_future(report_progress())
Expand Down Expand Up @@ -1300,6 +1298,7 @@ def __init__(self, options: argparse.Namespace):
self.is_run = False
self.loggers = [] # type: T.List[TestLogger]
self.loggers.append(ConsoleLogger())
self.need_console = False

if self.options.benchmark:
self.tests = load_benchmarks(options.wd)
Expand Down Expand Up @@ -1450,6 +1449,9 @@ def doit(self, options: argparse.Namespace) -> int:
runners = [self.get_test_runner(test) for test in tests]
self.duration_max_len = max([len(str(int(runner.timeout or 99)))
for runner in runners])
# Disable the progress report if it gets in the way
self.need_console = any((runner.console_mode is not ConsoleUser.LOGGER
for runner in runners))
self.run_tests(runners)
finally:
os.chdir(startdir)
Expand Down

0 comments on commit 90ea0dc

Please sign in to comment.