summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2022-08-25 14:37:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-31 16:54:17 +0100
commitd45b3be4bffe272b6d1dc7d76c3b72d000797f83 (patch)
tree2f9db0b36812293218fcabd0bdacb693a4741866 /meta/lib
parent00e2ab0852d3e68a52f77c3b83b5ef823db5d9e3 (diff)
downloadpoky-d45b3be4bffe272b6d1dc7d76c3b72d000797f83.tar.gz
oeqa/gotoolchain: put writable files in the Go module cache
By default 'go mod' creates read-only files, but that just complicates things. Add -modcacherw to make the cache read/write, so it can be cleaned up without needing to chmod. (From OE-Core rev: 7ff30e0d9fe8527cbc2f8ca84e0300fdc84663b6) (From OE-Core rev: 3527149662d483ea9c80a649d6953f4ba1e44224) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/gotoolchain.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/meta/lib/oeqa/selftest/cases/gotoolchain.py b/meta/lib/oeqa/selftest/cases/gotoolchain.py
index c809d7c9b1..345f533379 100644
--- a/meta/lib/oeqa/selftest/cases/gotoolchain.py
+++ b/meta/lib/oeqa/selftest/cases/gotoolchain.py
@@ -43,12 +43,6 @@ 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)
52 shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True) 46 shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True)
53 super(oeGoToolchainSelfTest, cls).tearDownClass() 47 super(oeGoToolchainSelfTest, cls).tearDownClass()
54 48
@@ -56,6 +50,7 @@ class oeGoToolchainSelfTest(OESelftestTestCase):
56 cmd = "cd %s/src/%s/%s; " % (self.go_path, proj, name) 50 cmd = "cd %s/src/%s/%s; " % (self.go_path, proj, name)
57 cmd = cmd + ". %s; " % self.env_SDK 51 cmd = cmd + ". %s; " % self.env_SDK
58 cmd = cmd + "export GOPATH=%s; " % self.go_path 52 cmd = cmd + "export GOPATH=%s; " % self.go_path
53 cmd = cmd + "export GOFLAGS=-modcacherw; "
59 cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd 54 cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd
60 return runCmd(cmd).status 55 return runCmd(cmd).status
61 56