summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2022-08-25 14:37:48 +0100
committerSteve Sakoman <steve@sakoman.com>2022-08-31 04:16:07 -1000
commit3527149662d483ea9c80a649d6953f4ba1e44224 (patch)
treedca5bbd8d8d1b0cce2c1fe822568ad11440d48d7 /meta/lib
parentb4ec76c699f8d20de7d6d2b51b062d8ec41e2486 (diff)
downloadopenembedded-core-contrib-3527149662d483ea9c80a649d6953f4ba1e44224.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) 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>
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):
@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()
@@ -56,6 +50,7 @@ class oeGoToolchainSelfTest(OESelftestTestCase):
cmd = "cd %s/src/%s/%s; " % (self.go_path, proj, name)
cmd = cmd + ". %s; " % self.env_SDK
cmd = cmd + "export GOPATH=%s; " % self.go_path
+ cmd = cmd + "export GOFLAGS=-modcacherw; "
cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd
return runCmd(cmd).status