mirror of
https://git.yoctoproject.org/git/poky
synced 2026-01-01 13:58:04 +00:00
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>
This commit is contained in:
parent
72fd157b91
commit
f5c5d1dd6c
|
|
@ -25,9 +25,9 @@ class GoCompileTest(OESDKTestCase):
|
|||
os.path.join(self.tc.sdk_dir, 'test.go'))
|
||||
|
||||
def setUp(self):
|
||||
target_arch = self.td.get("TARGET_ARCH")
|
||||
translated_target_arch = self.td.get("TRANSLATED_TARGET_ARCH")
|
||||
# Check for go-cross-canadian package (uses target architecture)
|
||||
if not self.tc.hasHostPackage("go-cross-canadian-%s" % target_arch):
|
||||
if not self.tc.hasHostPackage("go-cross-canadian-%s" % translated_target_arch):
|
||||
raise unittest.SkipTest("GoCompileTest class: SDK doesn't contain a Go cross-canadian toolchain")
|
||||
|
||||
# Additional runtime check for go command availability
|
||||
|
|
@ -63,9 +63,9 @@ class GoHostCompileTest(OESDKTestCase):
|
|||
os.path.join(self.tc.sdk_dir, 'test.go'))
|
||||
|
||||
def setUp(self):
|
||||
target_arch = self.td.get("TARGET_ARCH")
|
||||
translated_target_arch = self.td.get("TRANSLATED_TARGET_ARCH")
|
||||
# Check for go-cross-canadian package (uses target architecture)
|
||||
if not self.tc.hasHostPackage("go-cross-canadian-%s" % target_arch):
|
||||
if not self.tc.hasHostPackage("go-cross-canadian-%s" % translated_target_arch):
|
||||
raise unittest.SkipTest("GoHostCompileTest class: SDK doesn't contain a Go cross-canadian toolchain")
|
||||
|
||||
# Additional runtime check for go command availability
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user