project tests: do not use tqdm progress bars for a single test
This can happen for example with `--only fpga` as that category has
exactly one test.
@@ -1230,9 +1230,11 @@ def _run_tests(all_tests: T.List[T.Tuple[str, T.List[TestDef], bool]],
# Ensure we only cancel once
tests_canceled = False
- # Optionally enable the tqdm progress bar
+ # Optionally enable the tqdm progress bar, but only if there is at least
+ # one LogRunFuture and one TestRunFuture
global safe_print
futures_iter: T.Iterable[RunFutureUnion] = futures
+ if len(futures) > 2:
try:
from tqdm import tqdm
futures_iter = tqdm(futures, desc='Running tests', unit='test')
