summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases/devtool.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-02 19:46:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-07-03 11:38:24 +0100
commite855b384f37e0d781a80fcd65daa23b676e4efac (patch)
tree6e0a6de7ba8c1d94bd9f74c68a648a03c31108a9 /meta/lib/oeqa/selftest/cases/devtool.py
parentc9c9913cf6bcadca941126c558f5a0790415b389 (diff)
downloadpoky-e855b384f37e0d781a80fcd65daa23b676e4efac.tar.gz
oeqa/selftest: recipetool/devtool: Avoid load_plugin test race
This bug has plagued the autobuilder for a couple of years and we've struggled to reproduce/debug it. The problem is the "lib" directory in meta-poky used during the load_plugin tests for recipetool and devtool can race and one can delete the files from the other leading to test failures. Deleting the lib directory only if empty will avoid this. [YOCTO #13070] (From OE-Core rev: d603e2fd589e1edbc67c8c2fefb6337e728b9d01) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest/cases/devtool.py')
-rw-r--r--meta/lib/oeqa/selftest/cases/devtool.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py
index 7d8f895045..b383ed9c50 100644
--- a/meta/lib/oeqa/selftest/cases/devtool.py
+++ b/meta/lib/oeqa/selftest/cases/devtool.py
@@ -1500,7 +1500,11 @@ class DevtoolUpgradeTests(DevtoolBase):
1500 dstdir = os.path.join(dstdir, p) 1500 dstdir = os.path.join(dstdir, p)
1501 if not os.path.exists(dstdir): 1501 if not os.path.exists(dstdir):
1502 os.makedirs(dstdir) 1502 os.makedirs(dstdir)
1503 self.track_for_cleanup(dstdir) 1503 if p == "lib":
1504 # Can race with other tests
1505 self.add_command_to_tearDown('rmdir --ignore-fail-on-non-empty %s' % dstdir)
1506 else:
1507 self.track_for_cleanup(dstdir)
1504 dstfile = os.path.join(dstdir, os.path.basename(srcfile)) 1508 dstfile = os.path.join(dstdir, os.path.basename(srcfile))
1505 if srcfile != dstfile: 1509 if srcfile != dstfile:
1506 shutil.copy(srcfile, dstfile) 1510 shutil.copy(srcfile, dstfile)