diff options
| -rw-r--r-- | meta/classes/testimage.bbclass | 2 | ||||
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/go.py | 19 | ||||
| -rw-r--r-- | meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb | 7 |
3 files changed, 27 insertions, 1 deletions
diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass index e606de25fc..66de0e07c6 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" | 64 | dnf rpm opkg apt weston go" |
| 65 | 65 | ||
| 66 | DEFAULT_TEST_SUITES = "${BASICTESTSUITE}" | 66 | DEFAULT_TEST_SUITES = "${BASICTESTSUITE}" |
| 67 | 67 | ||
diff --git a/meta/lib/oeqa/runtime/cases/go.py b/meta/lib/oeqa/runtime/cases/go.py new file mode 100644 index 0000000000..89ba2c3ecb --- /dev/null +++ b/meta/lib/oeqa/runtime/cases/go.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 GoHelloworldTest(OERuntimeTestCase): | ||
| 10 | @OETestDepends(['ssh.SSHTest.test_ssh']) | ||
| 11 | @OEHasPackage(['go-helloworld']) | ||
| 12 | def test_gohelloworld(self): | ||
| 13 | cmd = "go-helloworld" | ||
| 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, Go examples!", 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 94405fd8fe..e8f0811485 100644 --- a/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb +++ b/meta/recipes-core/packagegroups/packagegroup-core-tools-testapps.bb | |||
| @@ -18,6 +18,12 @@ KEXECTOOLS:nios2 ?= "" | |||
| 18 | KEXECTOOLS:riscv64 ?= "" | 18 | KEXECTOOLS:riscv64 ?= "" |
| 19 | KEXECTOOLS:riscv32 ?= "" | 19 | KEXECTOOLS:riscv32 ?= "" |
| 20 | 20 | ||
| 21 | # go does not support ppc32, only ppc64 | ||
| 22 | # https://github.com/golang/go/issues/22885 | ||
| 23 | # gccgo may do better | ||
| 24 | GOTOOLS ?= "go-helloworld" | ||
| 25 | GOTOOLS:powerpc ?= "" | ||
| 26 | |||
| 21 | GSTEXAMPLES ?= "gst-examples" | 27 | GSTEXAMPLES ?= "gst-examples" |
| 22 | GSTEXAMPLES:riscv64 = "" | 28 | GSTEXAMPLES:riscv64 = "" |
| 23 | 29 | ||
| @@ -49,4 +55,5 @@ RDEPENDS:${PN} = "\ | |||
| 49 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', "${X11TOOLS}", "", d)} \ | 55 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', "${X11TOOLS}", "", d)} \ |
| 50 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', "${X11GLTOOLS}", "", d)} \ | 56 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 opengl', "${X11GLTOOLS}", "", d)} \ |
| 51 | ${@bb.utils.contains('DISTRO_FEATURES', '3g', "${3GTOOLS}", "", d)} \ | 57 | ${@bb.utils.contains('DISTRO_FEATURES', '3g', "${3GTOOLS}", "", d)} \ |
| 58 | ${GOTOOLS} \ | ||
| 52 | " | 59 | " |
