diff options
-rw-r--r-- | meta/lib/oeqa/selftest/cases/gotoolchain.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/meta/lib/oeqa/selftest/cases/gotoolchain.py b/meta/lib/oeqa/selftest/cases/gotoolchain.py index 3119520f0d..4fc3605f42 100644 --- a/meta/lib/oeqa/selftest/cases/gotoolchain.py +++ b/meta/lib/oeqa/selftest/cases/gotoolchain.py | |||
@@ -46,26 +46,25 @@ class oeGoToolchainSelfTest(OESelftestTestCase): | |||
46 | shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True) | 46 | shutil.rmtree(cls.tmpdir_SDKQA, ignore_errors=True) |
47 | super(oeGoToolchainSelfTest, cls).tearDownClass() | 47 | super(oeGoToolchainSelfTest, cls).tearDownClass() |
48 | 48 | ||
49 | def run_sdk_go_command(self, gocmd): | 49 | def run_sdk_go_command(self, gocmd, proj, name): |
50 | cmd = "cd %s; " % self.tmpdir_SDKQA | 50 | cmd = "cd %s/src/%s/%s; " % (self.go_path, proj, name) |
51 | cmd = cmd + ". %s; " % self.env_SDK | 51 | cmd = cmd + ". %s; " % self.env_SDK |
52 | cmd = cmd + "export GOPATH=%s; " % self.go_path | 52 | cmd = cmd + "export GOPATH=%s; " % self.go_path |
53 | cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd | 53 | cmd = cmd + "${CROSS_COMPILE}go %s" % gocmd |
54 | return runCmd(cmd).status | 54 | return runCmd(cmd).status |
55 | 55 | ||
56 | def test_go_dep_build(self): | 56 | def test_go_dep_build(self): |
57 | proj = "github.com/golang" | 57 | proj = "github.com/direnv" |
58 | name = "dep" | 58 | name = "direnv" |
59 | ver = "v0.3.1" | 59 | ver = "v2.27.0" |
60 | archive = ".tar.gz" | 60 | archive = ".tar.gz" |
61 | url = "https://%s/%s/archive/%s%s" % (proj, name, ver, archive) | 61 | url = "https://%s/%s/archive/%s%s" % (proj, name, ver, archive) |
62 | 62 | ||
63 | runCmd("cd %s; wget %s" % (self.tmpdir_SDKQA, url)) | 63 | runCmd("cd %s; wget %s" % (self.tmpdir_SDKQA, url)) |
64 | runCmd("cd %s; tar -xf %s" % (self.tmpdir_SDKQA, ver+archive)) | 64 | runCmd("cd %s; tar -xf %s" % (self.tmpdir_SDKQA, ver+archive)) |
65 | runCmd("mkdir -p %s/src/%s" % (self.go_path, proj)) | 65 | runCmd("mkdir -p %s/src/%s" % (self.go_path, proj)) |
66 | runCmd("mv %s/dep-0.3.1 %s/src/%s/%s" | 66 | runCmd("mv %s/direnv-2.27.0 %s/src/%s/%s" |
67 | % (self.tmpdir_SDKQA, self.go_path, proj, name)) | 67 | % (self.tmpdir_SDKQA, self.go_path, proj, name)) |
68 | retv = self.run_sdk_go_command('build %s/%s/cmd/dep' | 68 | retv = self.run_sdk_go_command('build', proj, name) |
69 | % (proj, name)) | ||
70 | self.assertEqual(retv, 0, | 69 | self.assertEqual(retv, 0, |
71 | msg="Running go build failed for %s" % name) | 70 | msg="Running go build failed for %s" % name) |