Commit bde5cb43 authored by Dylan Baker's avatar Dylan Baker

framework: ensure that all tests are run before exiting

This is a bug that has existed for a long time, and I'm not really sure
how we haven't hit this before honestly, I think that the reason this
has worked is that we've always provided a concrete type to to
pool.imap.

The problem is that pool.imap is an iterator. If you don't walk the
results then the program might exit before finishing. This seems to be
especially true when running without -c or -1. Instead we'll write the
loop, using pool.apply_async does basically the same thing (without the
ability to use chunks), but with out exiting early.
Tested-by: Michel Dänzer's avatarMichel Dänzer <michel.daenzer@amd.com>
parent 0ecc0d64
......@@ -584,8 +584,8 @@ def run(profiles, logger, backend, concurrency):
# more code, and adding side-effects
test_list = (x for x in test_list if filterby(x))
pool.imap(lambda pair: test(pair[0], pair[1], profile, pool),
test_list, chunksize)
for n, t in test_list:
pool.apply_async(test, [n, t, profile, pool])
def run_profile(profile, test_list):
"""Run an individual profile."""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment