summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2021-12-15 23:40:13 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-12-17 09:56:14 +0000
commit2e0f03802ba14b3313db31e232a4185e4ee8b77f (patch)
tree8c99a9e9bb52ac4d90d35120a1ad597c9ca611a2 /meta/lib/oeqa
parentbabd34dc43cb98c61c066c3a8434aab5a818845a (diff)
downloadpoky-2e0f03802ba14b3313db31e232a4185e4ee8b77f.tar.gz
rust-hello-world: test at runtime
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>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/runtime/cases/rust.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/rust.py b/meta/lib/oeqa/runtime/cases/rust.py
new file mode 100644
index 0000000000..b3d6cf7f37
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/rust.py
@@ -0,0 +1,19 @@
1#
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)