diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-11-13 13:28:05 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-11-26 07:50:35 -0800 |
| commit | f5c5d1dd6cb102e0026c3e7cd9b78e95ff2928e6 (patch) | |
| tree | 1f950fecc05755e24f89e976c25ad23eb7e84315 /meta/lib | |
| parent | 72fd157b91d8326bec908fe2582a9f5e776b0b2a (diff) | |
| download | poky-f5c5d1dd6cb102e0026c3e7cd9b78e95ff2928e6.tar.gz | |
oeqa: fix package detection in go sdk tests
The test are skipped if architecture contains dash because TARGET_ARCH
contains underscore while package name contains dash. Here the
translation needs to be done.
Note that poky distro default arch has dash:
MACHINE="qemux86-64"
TARGET_ARCH="x86_64"
ERROR: Nothing PROVIDES 'go-cross-canadian-x86_64'. Close matches:
gcc-cross-canadian-x86-64
gdb-cross-canadian-x86-64
go-cross-canadian-x86-64
TRANSLATED_TARGET_ARCH="x86-64"
Quoting meta/classes-recipe/cross-canadian.bbclass:
TRANSLATED_TARGET_ARCH is added into PN
(From OE-Core rev: 82a46b70bfba7c4ce4fd20e2658b182b03e55037)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/lib')
| -rw-r--r-- | meta/lib/oeqa/sdk/cases/go.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oeqa/sdk/cases/go.py b/meta/lib/oeqa/sdk/cases/go.py index a050df7a9f..693be89e1d 100644 --- a/meta/lib/oeqa/sdk/cases/go.py +++ b/meta/lib/oeqa/sdk/cases/go.py | |||
| @@ -25,9 +25,9 @@ class GoCompileTest(OESDKTestCase): | |||
| 25 | os.path.join(self.tc.sdk_dir, 'test.go')) | 25 | os.path.join(self.tc.sdk_dir, 'test.go')) |
| 26 | 26 | ||
| 27 | def setUp(self): | 27 | def setUp(self): |
| 28 | target_arch = self.td.get("TARGET_ARCH") | 28 | translated_target_arch = self.td.get("TRANSLATED_TARGET_ARCH") |
| 29 | # Check for go-cross-canadian package (uses target architecture) | 29 | # Check for go-cross-canadian package (uses target architecture) |
| 30 | if not self.tc.hasHostPackage("go-cross-canadian-%s" % target_arch): | 30 | if not self.tc.hasHostPackage("go-cross-canadian-%s" % translated_target_arch): |
| 31 | raise unittest.SkipTest("GoCompileTest class: SDK doesn't contain a Go cross-canadian toolchain") | 31 | raise unittest.SkipTest("GoCompileTest class: SDK doesn't contain a Go cross-canadian toolchain") |
| 32 | 32 | ||
| 33 | # Additional runtime check for go command availability | 33 | # Additional runtime check for go command availability |
| @@ -63,9 +63,9 @@ class GoHostCompileTest(OESDKTestCase): | |||
| 63 | os.path.join(self.tc.sdk_dir, 'test.go')) | 63 | os.path.join(self.tc.sdk_dir, 'test.go')) |
| 64 | 64 | ||
| 65 | def setUp(self): | 65 | def setUp(self): |
| 66 | target_arch = self.td.get("TARGET_ARCH") | 66 | translated_target_arch = self.td.get("TRANSLATED_TARGET_ARCH") |
| 67 | # Check for go-cross-canadian package (uses target architecture) | 67 | # Check for go-cross-canadian package (uses target architecture) |
| 68 | if not self.tc.hasHostPackage("go-cross-canadian-%s" % target_arch): | 68 | if not self.tc.hasHostPackage("go-cross-canadian-%s" % translated_target_arch): |
| 69 | raise unittest.SkipTest("GoHostCompileTest class: SDK doesn't contain a Go cross-canadian toolchain") | 69 | raise unittest.SkipTest("GoHostCompileTest class: SDK doesn't contain a Go cross-canadian toolchain") |
| 70 | 70 | ||
| 71 | # Additional runtime check for go command availability | 71 | # Additional runtime check for go command availability |
