[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: [OE-core] [hardknott][PATCH 08/10] oeqa/selftest/gotoolchain: Fix temp file cleanup
From: "Anuj Mittal" <anuj.mittal () intel ! com>
Date: 2021-09-29 14:59:06
Message-ID: 985283733946f42ca4c9ea5ef3611cbaa491088c.1632903759.git.anuj.mittal () intel ! com
[Download RAW message or body]
Content-Transfer-Encoding: 8bit
From: Richard Purdie <richard.purdie@linuxfoundation.org>
The go tests leave readonly files and directories behind.
Fix this to allow cleanup.
[YOCTO #14575]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5680e95d7bd9fe00a797b2d0deb8cb4790027508)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
meta/lib/oeqa/selftest/cases/gotoolchain.py | 6 ++++++
1 file changed, 6 insertions(+)
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):
@classmethod
def tearDownClass(cls):
+ # Go creates file which are readonly
+ for dirpath, dirnames, filenames in os.walk(cls.tmpdir_SDKQA):
+ for filename in filenames + dirnames:
+ f = os.path.join(dirpath, filename)
+ if not os.path.islink(f):
+ os.chmod(f, 0o775)
shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True)
super(oeGoToolchainSelfTest, cls).tearDownClass()
--
2.31.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156465): https://lists.openembedded.org/g/openembedded-core/message/156465
Mute This Topic: https://lists.openembedded.org/mt/85950277/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic