diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-25 19:02:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-10-02 09:53:15 +0100 |
commit | da70c9783f85849c20b51f5ce69bf18453dcc7c8 (patch) | |
tree | a4236f0dadc6463d859c489e70868364c225eb43 /meta/lib | |
parent | 98e9f20dd1f03beb4228048c7e4df6bf7bc2a861 (diff) | |
download | poky-da70c9783f85849c20b51f5ce69bf18453dcc7c8.tar.gz |
oeqa/selftest/gotoolchain: Fix temp file cleanup
The go tests leave readonly files and directories behind.
Fix this to allow cleanup.
[YOCTO #14575]
(From OE-Core rev: 985283733946f42ca4c9ea5ef3611cbaa491088c)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5680e95d7bd9fe00a797b2d0deb8cb4790027508)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/selftest/cases/gotoolchain.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/cases/gotoolchain.py b/meta/lib/oeqa/selftest/cases/gotoolchain.py index 4fc3605f42..c809d7c9b1 100644 --- a/meta/lib/oeqa/selftest/cases/gotoolchain.py +++ b/meta/lib/oeqa/selftest/cases/gotoolchain.py | |||
@@ -43,6 +43,12 @@ class oeGoToolchainSelfTest(OESelftestTestCase): | |||
43 | 43 | ||
44 | @classmethod | 44 | @classmethod |
45 | def tearDownClass(cls): | 45 | def tearDownClass(cls): |
46 | # Go creates file which are readonly | ||
47 | for dirpath, dirnames, filenames in os.walk(cls.tmpdir_SDKQA): | ||
48 | for filename in filenames + dirnames: | ||
49 | f = os.path.join(dirpath, filename) | ||
50 | if not os.path.islink(f): | ||
51 | os.chmod(f, 0o775) | ||
46 | shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True) | 52 | shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True) |
47 | super(oeGoToolchainSelfTest, cls).tearDownClass() | 53 | super(oeGoToolchainSelfTest, cls).tearDownClass() |
48 | 54 | ||