aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2022-06-30 10:17:30 -0700
committerNirbheek Chauhan <nirbheek@centricular.com>2022-08-08 19:13:05 +0530
commit8e9dc6e4c05854c657a25230d4507a49aa8cb6d4 (patch)
treef5b82582acd660754531839ac6b32261d66a3328
parent235c78682e82bba37b577f66f40ed3384db3d341 (diff)
downloadmeson-8e9dc6e4c05854c657a25230d4507a49aa8cb6d4.zip
meson-8e9dc6e4c05854c657a25230d4507a49aa8cb6d4.tar.gz
meson-8e9dc6e4c05854c657a25230d4507a49aa8cb6d4.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-xrun_project_tests.py2
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')