Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 1 | # |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
| 7 | from oeqa.runtime.case import OERuntimeTestCase |
| 8 | from oeqa.core.decorator.depends import OETestDepends |
| 9 | from oeqa.runtime.decorator.package import OEHasPackage |
| 10 | |
| 11 | class GoHelloworldTest(OERuntimeTestCase): |
| 12 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
| 13 | @OEHasPackage(['go-helloworld']) |
| 14 | def test_gohelloworld(self): |
| 15 | cmd = "go-helloworld" |
| 16 | status, output = self.target.run(cmd) |
| 17 | msg = 'Exit status was not 0. Output: %s' % output |
| 18 | self.assertEqual(status, 0, msg=msg) |
| 19 | |
| 20 | msg = 'Incorrect output: %s' % output |
| 21 | self.assertEqual(output, "Hello, Go examples!", msg=msg) |