summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/core/utils/concurrencytest.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-05 10:56:42 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-12-06 14:41:28 +0000
commit055695994ad4945a07a0866236257a999409c419 (patch)
treeeb6e471cd63e76f9798f36466cdb63cd85238862 /meta/lib/oeqa/core/utils/concurrencytest.py
parente10df257c9f1fdb63a8683f7aea80b0e5df896ca (diff)
downloadpoky-055695994ad4945a07a0866236257a999409c419.tar.gz
oeqa/concurrencytest: Optimise for autobuilder/clobberdir
We're seeing huge delays on the autobuilder during oe-selftest builddir deletion. For example there is a currently running selftest we could do with the results from and its been going 13 hours, at least 8 of which was in deletion of the builddirs. There are a variety of ways we could solve this problem however the autobuilder has a mechanism for deferred deletion, "clobberdir" which it already uses for this kind of work. Whilst in general hardcoding things like this is horrible, I believe in this case the benefits (and resulting improvements on my sanity if nothing else) mean this is a case where we should do it. If/as/when someone can come up with a better solution that is fine and this can be replaced. (From OE-Core rev: 51a84937d32a85cbdb7d5b1d1ec69a290d0c303b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/core/utils/concurrencytest.py')
-rw-r--r--meta/lib/oeqa/core/utils/concurrencytest.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/meta/lib/oeqa/core/utils/concurrencytest.py b/meta/lib/oeqa/core/utils/concurrencytest.py
index 0f7b3dcc11..71ec0df5fa 100644
--- a/meta/lib/oeqa/core/utils/concurrencytest.py
+++ b/meta/lib/oeqa/core/utils/concurrencytest.py
@@ -221,6 +221,15 @@ def removebuilddir(d):
221 while delay and os.path.exists(d + "/bitbake.lock"): 221 while delay and os.path.exists(d + "/bitbake.lock"):
222 time.sleep(1) 222 time.sleep(1)
223 delay = delay - 1 223 delay = delay - 1
224 # Deleting these directories takes a lot of time, use autobuilder
225 # clobberdir if its available
226 clobberdir = os.path.expanduser("~/yocto-autobuilder-helper/janitor/clobberdir")
227 if os.path.exists(clobberdir):
228 try:
229 subprocess.check_call([clobberdir, d])
230 return
231 except subprocess.CalledProcessError:
232 pass
224 bb.utils.prunedir(d, ionice=True) 233 bb.utils.prunedir(d, ionice=True)
225 234
226def fork_for_tests(concurrency_num, suite): 235def fork_for_tests(concurrency_num, suite):