mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
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: 5680e95d7bd9fe00a797b2d0deb8cb4790027508) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -43,6 +43,12 @@ class oeGoToolchainSelfTest(OESelftestTestCase):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def tearDownClass(cls):
|
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)
|
shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True)
|
||||||
super(oeGoToolchainSelfTest, cls).tearDownClass()
|
super(oeGoToolchainSelfTest, cls).tearDownClass()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user