summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/sdk
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-14 23:27:14 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-16 17:41:59 +0100
commitf4886717e5b46ab9db634b20e5f7c7951d9b2511 (patch)
treefc89fffa89a7529503f6b27172622d7715953122 /meta/lib/oeqa/sdk
parenta34a0e75e76e1acd2a201b631f2a57ec322941a5 (diff)
downloadpoky-f4886717e5b46ab9db634b20e5f7c7951d9b2511.tar.gz
oeqa: Update cleanup code to wait for hashserv exit
We sometimes see exceptions from code seeing the hashserv DB files being removed at directory cleanup time. Add a check to ensure the hashserv has written the data base journal (and hence likely exited) before cleaning up. This will hopefully avoid errors like: Traceback (most recent call last): File "[...]/meta/lib/oeqa/sdk/buildtools-cases/build.py", line 30, in test_libc delay = delay - 1 File "/usr/lib/python3.6/tempfile.py", line 948, in __exit__ self.cleanup() File "/usr/lib/python3.6/tempfile.py", line 952, in cleanup _rmtree(self.name) File "/usr/lib/python3.6/shutil.py", line 486, in rmtree _rmtree_safe_fd(fd, path, onerror) File "/usr/lib/python3.6/shutil.py", line 424, in _rmtree_safe_fd _rmtree_safe_fd(dirfd, fullname, onerror) File "/usr/lib/python3.6/shutil.py", line 444, in _rmtree_safe_fd onerror(os.unlink, fullname, sys.exc_info()) File "/usr/lib/python3.6/shutil.py", line 442, in _rmtree_safe_fd os.unlink(name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'hashserv.db-wal' (From OE-Core rev: 0b07d9add687d78495176cda0f3011c10ffa4d4b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/sdk')
-rw-r--r--meta/lib/oeqa/sdk/buildtools-cases/build.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/sdk/buildtools-cases/build.py b/meta/lib/oeqa/sdk/buildtools-cases/build.py
index 9c9a84bf8a..aee2e5a8c0 100644
--- a/meta/lib/oeqa/sdk/buildtools-cases/build.py
+++ b/meta/lib/oeqa/sdk/buildtools-cases/build.py
@@ -25,6 +25,6 @@ class BuildTests(OESDKTestCase):
25 self._run('. %s/oe-init-build-env %s && bitbake virtual/libc' % (corebase, testdir)) 25 self._run('. %s/oe-init-build-env %s && bitbake virtual/libc' % (corebase, testdir))
26 finally: 26 finally:
27 delay = 10 27 delay = 10
28 while delay and os.path.exists(testdir + "/bitbake.lock"): 28 while delay and (os.path.exists(testdir + "/bitbake.lock") or os.path.exists(testdir + "/cache/hashserv.db-wal")):
29 time.sleep(1) 29 time.sleep(1)
30 delay = delay - 1 30 delay = delay - 1