Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] eSDK.py: avoid error in tearDownClass due to race condistion
@ 2019-01-24  9:33 Chen Qi
  2019-01-24  9:33 ` [PATCH 1/1] " Chen Qi
  0 siblings, 1 reply; 2+ messages in thread
From: Chen Qi @ 2019-01-24  9:33 UTC (permalink / raw)
  To: openembedded-core

*** BLURB HERE ***
The following changes since commit ba0b32ebc3520c367915657b8fb8878be5bfde92:

  remove unused distutils-tools.bbclass (2019-01-23 07:57:07 +0000)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib ChenQi/eSDK-race
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=ChenQi/eSDK-race

Chen Qi (1):
  eSDK.py: avoid error in tearDownClass due to race condistion

 meta/lib/oeqa/selftest/cases/eSDK.py | 6 ++++++
 1 file changed, 6 insertions(+)

-- 
1.9.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 1/1] eSDK.py: avoid error in tearDownClass due to race condistion
  2019-01-24  9:33 [PATCH 0/1] eSDK.py: avoid error in tearDownClass due to race condistion Chen Qi
@ 2019-01-24  9:33 ` Chen Qi
  0 siblings, 0 replies; 2+ messages in thread
From: Chen Qi @ 2019-01-24  9:33 UTC (permalink / raw)
  To: openembedded-core

When removing the temporary directory, it's possible that bitbake.lock
file is removed by bitbake during the cleanup. And this leads to the
following error.

  FileNotFoundError: [Errno 2] No such file or directory: 'bitbake.lock'

So add a check to remove this file before cleaning up the temporary
directory.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
---
 meta/lib/oeqa/selftest/cases/eSDK.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/lib/oeqa/selftest/cases/eSDK.py b/meta/lib/oeqa/selftest/cases/eSDK.py
index d7aef93..8e3a43d 100644
--- a/meta/lib/oeqa/selftest/cases/eSDK.py
+++ b/meta/lib/oeqa/selftest/cases/eSDK.py
@@ -2,6 +2,7 @@ import tempfile
 import shutil
 import os
 import glob
+import time
 from oeqa.core.decorator.oeid import OETestID
 from oeqa.selftest.case import OESelftestTestCase
 from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars
@@ -95,6 +96,11 @@ SSTATE_MIRRORS =  "file://.* file://%s/PATH"
 
     @classmethod
     def tearDownClass(cls):
+        for i in range(0, 10):
+            if os.path.exists(os.path.join(cls.tmpdir_eSDKQA, 'bitbake.lock')):
+                time.sleep(1)
+            else:
+                break
         cls.tmpdirobj.cleanup()
         super().tearDownClass()
 
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-24  9:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-24  9:33 [PATCH 0/1] eSDK.py: avoid error in tearDownClass due to race condistion Chen Qi
2019-01-24  9:33 ` [PATCH 1/1] " Chen Qi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox