summaryrefslogtreecommitdiffstats
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:47 +0100
commitce265cf467f1c3e5ba2edbfbef2170df1a727a52 (patch)
treef9a744bcf0af3629e397379fa19c64b491360c90
parentf55924d8d2258ca8b60c46d78ae2de06add59798 (diff)
downloadopenembedded-core-contrib-ce265cf467f1c3e5ba2edbfbef2170df1a727a52.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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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):
'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')),