Sort tests before anything else.

In the sequential case we weren't sorting, which was confusing.
pull/1314/head
Sean Silva 2022-08-29 21:46:39 +00:00
parent e16b43e20b
commit 079bff33f1
1 changed files with 3 additions and 3 deletions

View File

@ -341,6 +341,9 @@ def run_tests(tests: List[Test], config: TestConfig, sequential=False, verbose=F
if mp.cpu_count() == 2:
num_processes = 1
# Sort the tests to make output nicer.
tests = list(sorted(tests, key=lambda t: t.unique_name))
# TODO: If num_processes == 1, then run without any of the multiprocessing
# machinery. In theory it should work, but any crash in the testing process
# seems to cause a cascade of failures resulting in undecipherable error
@ -348,9 +351,6 @@ def run_tests(tests: List[Test], config: TestConfig, sequential=False, verbose=F
if num_processes == 1 or sequential:
return [compile_and_run_test(test, config, verbose) for test in tests]
# Sort the tests to make output nicer.
tests = list(sorted(tests, key=lambda t: t.unique_name))
# To run e2e tests in parallel:
# The tests are put into a synchronized queue. Multiple worker processes are
# created. Each worker takes one test at a time from the queue to compile