mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 00:49:33 +02:00
go-helloworld: test at runtime
This adds a smoke check for whether the Go toolchain actually produces working executables across a range of architectures. (From OE-Core rev: 2819bb2cf22c6cfcaeaee79f0280097ec9cb9327) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
278cb0fc07
commit
375c82ad00
@@ -61,7 +61,7 @@ BASICTESTSUITE = "\
|
|||||||
ping date df ssh scp python perl gi ptest parselogs \
|
ping date df ssh scp python perl gi ptest parselogs \
|
||||||
logrotate connman systemd oe_syslog pam stap ldd xorg \
|
logrotate connman systemd oe_syslog pam stap ldd xorg \
|
||||||
kernelmodule gcc buildcpio buildlzip buildgalculator \
|
kernelmodule gcc buildcpio buildlzip buildgalculator \
|
||||||
dnf rpm opkg apt weston"
|
dnf rpm opkg apt weston go"
|
||||||
|
|
||||||
DEFAULT_TEST_SUITES = "${BASICTESTSUITE}"
|
DEFAULT_TEST_SUITES = "${BASICTESTSUITE}"
|
||||||
|
|
||||||
|
|||||||
19
meta/lib/oeqa/runtime/cases/go.py
Normal file
19
meta/lib/oeqa/runtime/cases/go.py
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
#
|
||||||
|
|
||||||
|
from oeqa.runtime.case import OERuntimeTestCase
|
||||||
|
from oeqa.core.decorator.depends import OETestDepends
|
||||||
|
from oeqa.runtime.decorator.package import OEHasPackage
|
||||||
|
|
||||||
|
class GoHelloworldTest(OERuntimeTestCase):
|
||||||
|
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
||||||
|
@OEHasPackage(['go-helloworld'])
|
||||||
|
def test_gohelloworld(self):
|
||||||
|
cmd = "go-helloworld"
|
||||||
|
status, output = self.target.run(cmd)
|
||||||
|
msg = 'Exit status was not 0. Output: %s' % output
|
||||||
|
self.assertEqual(status, 0, msg=msg)
|
||||||
|
|
||||||
|
msg = 'Incorrect output: %s' % output
|
||||||
|
self.assertEqual(output, "Hello, Go examples!", msg=msg)
|
||||||
@@ -18,6 +18,12 @@ KEXECTOOLS:nios2 ?= ""
|
|||||||
KEXECTOOLS:riscv64 ?= ""
|
KEXECTOOLS:riscv64 ?= ""
|
||||||
KEXECTOOLS:riscv32 ?= ""
|
KEXECTOOLS:riscv32 ?= ""
|
||||||
|
|
||||||
|
# go does not support ppc32, only ppc64
|
||||||
|
# https://github.com/golang/go/issues/22885
|
||||||
|
# gccgo may do better
|
||||||
|
GOTOOLS ?= "go-helloworld"
|
||||||
|
GOTOOLS:powerpc ?= ""
|
||||||
|
|
||||||
GSTEXAMPLES ?= "gst-examples"
|
GSTEXAMPLES ?= "gst-examples"
|
||||||
GSTEXAMPLES:riscv64 = ""
|
GSTEXAMPLES:riscv64 = ""
|
||||||
|
|
||||||
@@ -49,4 +55,5 @@ RDEPENDS:${PN} = "\
|
|||||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11', "${X11TOOLS}", "", d)} \
|
${@bb.utils.contains('DISTRO_FEATURES', 'x11', "${X11TOOLS}", "", d)} \
|
||||||
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', "${X11GLTOOLS}", "", d)} \
|
${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', "${X11GLTOOLS}", "", d)} \
|
||||||
${@bb.utils.contains('DISTRO_FEATURES', '3g', "${3GTOOLS}", "", d)} \
|
${@bb.utils.contains('DISTRO_FEATURES', '3g', "${3GTOOLS}", "", d)} \
|
||||||
|
${GOTOOLS} \
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user