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:04 +0000
commit14bb638b0df7acfa6aa89abf4625357f8cde886b (patch)
tree8eea4352c945cedb059f733d162f40e1989b8218 /meta/lib/oeqa
parent3c99f921d669237eb41f6cff8ab554dd8927e8b3 (diff)
downloadopenembedded-core-contrib-14bb638b0df7acfa6aa89abf4625357f8cde886b.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. 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 @@
+#
+# 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)