summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-25 19:02:15 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-26 14:36:49 +0100
commit5680e95d7bd9fe00a797b2d0deb8cb4790027508 (patch)
tree7d2f3f5f1299ff21bfe8070d1bca4a76f6f16dc6
parent61feb650ac450db0a30675fc40bb65fab773159a (diff)
downloadopenembedded-core-5680e95d7bd9fe00a797b2d0deb8cb4790027508.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] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/selftest/cases/gotoolchain.py6
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):
@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()