summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases
diff options
context:
space:
mode:
authorTim Orling <timothy.t.orling@linux.intel.com>2020-09-28 21:49:05 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-30 15:01:47 +0100
commit4df098aeecd589ddd11a883e281285588a6966ca (patch)
tree989948d29c907b7b38688f4de257031d83bacc1d /meta/lib/oeqa/selftest/cases
parenta58f69f854c28d61a8c74b8af75b80b8695f6198 (diff)
downloadopenembedded-core-4df098aeecd589ddd11a883e281285588a6966ca.tar.gz
oeqa/selftest/cases/devtool.py: avoid .pyc race
In certain conditions, most likely under heavy load on the AutoBuilder, the prebuilt .pyc files are attempting to be executed before they have been completely copied. Avoid this by not copying the .pyc files (nor the __pycache__ directory). The impact of python3-native recreating the .pyc files should hopefully be negligible. YOCTO#13421 YOCTO#13803 Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases')
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index b383ed9c50..a3d2e9ea7c 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -56,7 +56,8 @@ def setUpModule():
if pth.startswith(canonical_layerpath):
if relpth.endswith('/'):
destdir = os.path.join(corecopydir, relpth)
- shutil.copytree(pth, destdir)
+ # avoid race condition by not copying .pyc files YPBZ#13421,13803
+ shutil.copytree(pth, destdir, ignore=ignore_patterns('*.pyc', '__pycache__'))
else:
destdir = os.path.join(corecopydir, os.path.dirname(relpth))
bb.utils.mkdirhier(destdir)