diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/testimage.bbclass | 2 | ||||
-rw-r--r-- | meta/lib/oeqa/runtime/cases/rust.py | 19 | ||||
-rw-r--r-- | meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb | 3 |
3 files changed, 23 insertions, 1 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index 66de0e07c6..1c5fd4ee6a 100644 --- a/meta/classes/testimage.bbclass +++ b/meta/classes/testimage.bbclass | |||
@@ -61,7 +61,7 @@ BASICTESTSUITE = "\ | |||
61 | ping date df ssh scp python perl gi ptest parselogs \ | 61 | ping date df ssh scp python perl gi ptest parselogs \ |
62 | logrotate connman systemd oe_syslog pam stap ldd xorg \ | 62 | logrotate connman systemd oe_syslog pam stap ldd xorg \ |
63 | kernelmodule gcc buildcpio buildlzip buildgalculator \ | 63 | kernelmodule gcc buildcpio buildlzip buildgalculator \ |
64 | dnf rpm opkg apt weston go" | 64 | dnf rpm opkg apt weston go rust" |
65 | 65 | ||
66 | DEFAULT_TEST_SUITES = "${BASICTESTSUITE}" | 66 | DEFAULT_TEST_SUITES = "${BASICTESTSUITE}" |
67 | 67 | ||
diff --git a/meta/lib/oeqa/runtime/cases/rust.py b/meta/lib/oeqa/runtime/cases/rust.py new file mode 100644 index 0000000000..b3d6cf7f37 --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/rust.py | |||
@@ -0,0 +1,19 @@ | |||
1 | # | ||
2 | # SPDX-License-Identifier: MIT | ||
3 | # | ||
4 | |||
5 | from oeqa.runtime.case import OERuntimeTestCase | ||
6 | from oeqa.core.decorator.depends import OETestDepends | ||
7 | from oeqa.runtime.decorator.package import OEHasPackage | ||
8 | |||
9 | class RustHelloworldTest(OERuntimeTestCase): | ||
10 | @OETestDepends(['ssh.SSHTest.test_ssh']) | ||
11 | @OEHasPackage(['rust-hello-world']) | ||
12 | def test_rusthelloworld(self): | ||
13 | cmd = "rust-hello-world" | ||
14 | status, output = self.target.run(cmd) | ||
15 | msg = 'Exit status was not 0. Output: %s' % output | ||
16 | self.assertEqual(status, 0, msg=msg) | ||
17 | |||
18 | msg = 'Incorrect output: %s' % output | ||
19 | self.assertEqual(output, "Hello, world!", msg=msg) | ||
diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb index 1fee1c925d..e05e329020 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb | |||
@@ -25,6 +25,8 @@ GOTOOLS ?= "go-helloworld" | |||
25 | GOTOOLS:powerpc ?= "" | 25 | GOTOOLS:powerpc ?= "" |
26 | GOTOOLS:riscv32 ?= "" | 26 | GOTOOLS:riscv32 ?= "" |
27 | 27 | ||
28 | RUSTTOOLS ?= "rust-hello-world" | ||
29 | |||
28 | GSTEXAMPLES ?= "gst-examples" | 30 | GSTEXAMPLES ?= "gst-examples" |
29 | GSTEXAMPLES:riscv64 = "" | 31 | GSTEXAMPLES:riscv64 = "" |
30 | 32 | ||
@@ -57,4 +59,5 @@ RDEPENDS:${PN} = "\ | |||
57 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', "${X11GLTOOLS}", "", d)} \ | 59 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', "${X11GLTOOLS}", "", d)} \ |
58 | ${@bb.utils.contains('DISTRO_FEATURES', '3g', "${3GTOOLS}", "", d)} \ | 60 | ${@bb.utils.contains('DISTRO_FEATURES', '3g', "${3GTOOLS}", "", d)} \ |
59 | ${GOTOOLS} \ | 61 | ${GOTOOLS} \ |
62 | ${RUSTTOOLS} \ | ||
60 | " | 63 | " |