Don't pre-split work across parallel job workers

This commit is contained in:
baldurk
2026-09-12 02:15:12 +01:00
parent 19718e4feb
commit a3fafbc29a
+5 -5
View File
@@ -381,12 +381,12 @@ def run_tests(test_include: str, test_exclude: str, debugger: bool, parallel: in
runcases.append((testclass, name, instance))
def test_runner(thread: int):
if parallel:
tests_to_run = [runcases[i] for i in range(thread, len(runcases), parallel)]
else:
tests_to_run = runcases
while True:
try:
testclass, name, instance = runcases.pop()
except IndexError:
break
for testclass, name, instance in tests_to_run:
output_buf: List[str] | None = []
# Print header (and footer) outside the exec so we know they will always be printed successfully