diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2021-12-15 23:40:13 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-12-17 09:56:14 +0000 |
| commit | 2e0f03802ba14b3313db31e232a4185e4ee8b77f (patch) | |
| tree | 8c99a9e9bb52ac4d90d35120a1ad597c9ca611a2 /meta/lib/oeqa/runtime | |
| parent | babd34dc43cb98c61c066c3a8434aab5a818845a (diff) | |
| download | poky-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/runtime')
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/rust.py | 19 |
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 | |||
| 5 | from oeqa.runtime.case import OERuntimeTestCase | ||
| 6 | from oeqa.core.decorator.depends import OETestDepends | ||
| 7 | from oeqa.runtime.decorator.package import OEHasPackage | ||
| 8 | |||
| 9 | class 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) | ||
