From 375c82ad0046eb3d0520cd8335e7472b45d13a48 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Sat, 27 Nov 2021 10:53:55 +0100 Subject: 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 Signed-off-by: Richard Purdie --- meta/lib/oeqa/runtime/cases/go.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 meta/lib/oeqa/runtime/cases/go.py (limited to 'meta/lib/oeqa/runtime') 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 @@ +# +# 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) -- cgit v1.2.3-54-g00ecf