diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-06-30 10:17:30 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2022-07-06 15:59:47 -0400 |
commit | 15078112f9a04915d702d7a07018589cccdccf20 (patch) | |
tree | 08b4a268bc565734f03ee38e8110f3efbd171f97 | |
parent | 407eaa3b4ac4d4bcbe5a30cae19424ce4126c5f3 (diff) | |
download | meson-15078112f9a04915d702d7a07018589cccdccf20.zip meson-15078112f9a04915d702d7a07018589cccdccf20.tar.gz meson-15078112f9a04915d702d7a07018589cccdccf20.tar.bz2 |
run_project_tests: Don't try to use tqdm when stdout is not a tty
Like when piped to something like less, where tqdm just makes a mess of
the output instead of providing something helpful.
-rwxr-xr-x | run_project_tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index 7cbce64..fc5a969 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -1245,7 +1245,7 @@ def _run_tests(all_tests: T.List[T.Tuple[str, T.List[TestDef], bool]], # one LogRunFuture and one TestRunFuture global safe_print futures_iter: T.Iterable[RunFutureUnion] = futures - if len(futures) > 2: + if len(futures) > 2 and sys.stdout.isatty(): try: from tqdm import tqdm futures_iter = tqdm(futures, desc='Running tests', unit='test') |