]> code.ossystems Code Review - openembedded-core.git/commitdiff
oeqa/selftest/devtool: Add sync call to test teardown
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 29 Sep 2020 16:56:49 +0000 (17:56 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 30 Sep 2020 14:01:47 +0000 (15:01 +0100)
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>
meta/lib/oeqa/selftest/cases/devtool.py

index a3d2e9ea7cc92f2bc69cc2e709ac8b011e761561..4a791ff40e0906680e1100fd7334c9e0dbae96b9 100644 (file)
@@ -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')),