blob: b3d6cf7f37fb2f8dd055a786c4376e21210761b0 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001#
2# SPDX-License-Identifier: MIT
3#
4
5from oeqa.runtime.case import OERuntimeTestCase
6from oeqa.core.decorator.depends import OETestDepends
7from oeqa.runtime.decorator.package import OEHasPackage
8
9class RustHelloworldTest(OERuntimeTestCase):
10 @OETestDepends(['ssh.SSHTest.test_ssh'])
11 @OEHasPackage(['rust-hello-world'])
12 def test_rusthelloworld(self):
13 cmd = "rust-hello-world"
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, world!", msg=msg)