oeqa: Add sync call to command execution
PATCH 1/1 oeqa: Add sync call to command execution
We previously put a sync call into devtool to try and combat the bitbake timeout issues on the autobuilder. It isn't enough as the timeouts occur mid test. They are also occurring on non-devtool tests.
Add in sync calls around command execution instead.
Signed-off-by Richard Purdie <[email protected]>
--- meta/lib/oeqa/selftest/cases/devtool.py | 7 ------- meta/lib/oeqa/utils/commands.py | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-)
meta/lib/oeqa/selftest/cases/devtool.py +0 -7
@@ -107,13 +107,6 @@ 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')),
meta/lib/oeqa/utils/commands.py +5 -0
@@ -184,6 +184,11 @@ def runCmd(command, ignore_status=False, timeout=None, assert_error=True, cmd = Command(command, timeout=timeout, output_log=output_log, **options) cmd.run() + # tests can be 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. + os.system("sync") + result.command = command result.status = cmd.status result.output = cmd.output
Signature · 1 line
2.25.1