mirror of
https://git.yoctoproject.org/poky
synced 2026-02-07 17:26:36 +01:00
This adds a smoke check for whether the rust toolchain actually produces working executables across a range of architectures. (From OE-Core rev: 14bb638b0df7acfa6aa89abf4625357f8cde886b) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
20 lines
649 B
Python
20 lines
649 B
Python
#
|
|
# 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 RustHelloworldTest(OERuntimeTestCase):
|
|
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
|
@OEHasPackage(['rust-hello-world'])
|
|
def test_rusthelloworld(self):
|
|
cmd = "rust-hello-world"
|
|
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, world!", msg=msg)
|