summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-29 17:56:49 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-09-30 15:01:52 +0100
commitf6609eebca510b298f46074059f1643017166a49 (patch)
tree81ab5b7144f24abab50c406a1300b9513d8a7402 /meta/lib
parentdbeac4fc4558d2b6eed6155f6a834a15c2e02715 (diff)
downloadpoky-f6609eebca510b298f46074059f1643017166a49.tar.gz
oeqa/selftest/devtool: Add sync call to test teardown
Devtool 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. (From OE-Core rev: ce265cf467f1c3e5ba2edbfbef2170df1a727a52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index a3d2e9ea7c..4a791ff40e 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -107,6 +107,13 @@ class DevtoolBase(OESelftestTestCase):
107 'under the build directory') 107 'under the build directory')
108 self.append_config(self.sstate_conf) 108 self.append_config(self.sstate_conf)
109 109
110 def tearDown(self):
111 # devtools tests are heavy on IO and if bitbake can't write out its caches, we see timeouts.
112 # call sync around the tests to ensure the IO queue doesn't get too large, taking any IO
113 # hit here rather than in bitbake shutdown.
114 super().tearDown()
115 os.system("sync")
116
110 def _check_src_repo(self, repo_dir): 117 def _check_src_repo(self, repo_dir):
111 """Check srctree git repository""" 118 """Check srctree git repository"""
112 self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')), 119 self.assertTrue(os.path.isdir(os.path.join(repo_dir, '.git')),