summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2018-05-08 12:18:06 -0700
committerDylan Baker <dylan@pnwbakers.com>2018-05-09 11:10:32 -0700
commitbde5cb4376df9ad59db26e7083d91ed12e107970 (patch)
tree1bff29779816eeb7e0b94de8fa564605a6ddd3c5
parent0ecc0d643167528ccfcd8182d1786818305f9953 (diff)
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 <michel.daenzer@amd.com>
-rw-r--r--framework/profile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/profile.py b/framework/profile.py
index 5161f6e4c..44681592a 100644
--- a/framework/profile.py
+++ b/framework/profile.py
@@ -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."""