summaryrefslogtreecommitdiff
path: root/poky/meta/lib/oeqa/selftest/cases/devtool.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/lib/oeqa/selftest/cases/devtool.py')
-rw-r--r--poky/meta/lib/oeqa/selftest/cases/devtool.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/poky/meta/lib/oeqa/selftest/cases/devtool.py b/poky/meta/lib/oeqa/selftest/cases/devtool.py
index b383ed9c50..4a791ff40e 100644
--- a/poky/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/poky/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)
@@ -106,6 +107,13 @@ class DevtoolBase(OESelftestTestCase):
'under the build directory')
self.append_config(self.sstate_conf)
+ def tearDown(self):
+ # devtools tests are heavy on IO and if bitbake can't write out its caches, we see timeouts.
+ # call sync around the tests to ensure the IO queue doesn't get too large, taking any IO
+ # hit here rather than in bitbake shutdown.
+ super().tearDown()
+ os.system("sync")
+
def _check_src_repo(self, repo_dir):
"""Check srctree git repository"""
self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')),