mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 12:29:55 +00:00
rust-hello-world: test at runtime
This adds a smoke check for whether the rust toolchain actually produces working executables across a range of architectures. (From OE-Core rev: 14bb638b0df7acfa6aa89abf4625357f8cde886b) 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
babd34dc43
commit
2e0f03802b
@@ -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 go"
|
dnf rpm opkg apt weston go rust"
|
||||||
|
|
||||||
DEFAULT_TEST_SUITES = "${BASICTESTSUITE}"
|
DEFAULT_TEST_SUITES = "${BASICTESTSUITE}"
|
||||||
|
|
||||||
|
|||||||
@@ -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 RustHelloworldTest(OERuntimeTestCase):
|
||||||
|
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
||||||
|
@OEHasPackage(['rust-hello-world'])
|
||||||
|
def test_rusthelloworld(self):
|
||||||
|
cmd = "rust-hello-world"
|
||||||
|
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, world!", msg=msg)
|
||||||
@@ -25,6 +25,8 @@ GOTOOLS ?= "go-helloworld"
|
|||||||
GOTOOLS:powerpc ?= ""
|
GOTOOLS:powerpc ?= ""
|
||||||
GOTOOLS:riscv32 ?= ""
|
GOTOOLS:riscv32 ?= ""
|
||||||
|
|
||||||
|
RUSTTOOLS ?= "rust-hello-world"
|
||||||
|
|
||||||
GSTEXAMPLES ?= "gst-examples"
|
GSTEXAMPLES ?= "gst-examples"
|
||||||
GSTEXAMPLES:riscv64 = ""
|
GSTEXAMPLES:riscv64 = ""
|
||||||
|
|
||||||
@@ -57,4 +59,5 @@ RDEPENDS:${PN} = "\
|
|||||||
${@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} \
|
${GOTOOLS} \
|
||||||
|
${RUSTTOOLS} \
|
||||||
"
|
"
|
||||||
|
|||||||
Reference in New Issue
Block a user