diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-11-27 10:53:55 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-11-29 23:07:13 +0000 |
| commit | 375c82ad0046eb3d0520cd8335e7472b45d13a48 (patch) | |
| tree | 7fb92a8c8df9ce5b1aeb92494264a00f663f8e12 /meta/lib | |
| parent | 278cb0fc0725fbfdcafd3b3afcfb7c7c6a4eee14 (diff) | |
| download | poky-375c82ad0046eb3d0520cd8335e7472b45d13a48.tar.gz | |
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>
Diffstat (limited to 'meta/lib')
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/go.py | 19 |
1 files changed, 19 insertions, 0 deletions
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) | ||
