summaryrefslogtreecommitdiffstats
path: root/meta/lib
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-05 20:35:26 +0000
commit51a84937d32a85cbdb7d5b1d1ec69a290d0c303b (patch)
tree0edd8144300ccee499aad3230e2047d6883f8266 /meta/lib
parentafb8d456360d86254ab00f05866c34d947d02749 (diff)
downloadopenembedded-core-contrib-51a84937d32a85cbdb7d5b1d1ec69a290d0c303b.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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-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):
while delay and os.path.exists(d + "/bitbake.lock"):
time.sleep(1)
delay = delay - 1
+ # Deleting these directories takes a lot of time, use autobuilder
+ # clobberdir if its available
+ clobberdir = os.path.expanduser("~/yocto-autobuilder-helper/janitor/clobberdir")
+ if os.path.exists(clobberdir):
+ try:
+ subprocess.check_call([clobberdir, d])
+ return
+ except subprocess.CalledProcessError:
+ pass
bb.utils.prunedir(d, ionice=True)
def fork_for_tests(concurrency_num, suite):