blob: 7514d108f1aafdee0307216b1e1f887b6fc60e95 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001#
Patrick Williams92b42cb2022-09-03 06:53:57 -05002# Copyright OpenEmbedded Contributors
3#
Andrew Geissler595f6302022-01-24 19:11:47 +00004# SPDX-License-Identifier: MIT
5#
6
7from oeqa.runtime.case import OERuntimeTestCase
8from oeqa.core.decorator.depends import OETestDepends
9from oeqa.runtime.decorator.package import OEHasPackage
10
11class 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)