diff options
Diffstat (limited to 'meta/lib/oeqa/runtime')
| -rw-r--r-- | meta/lib/oeqa/runtime/cases/rust.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/rust.py b/meta/lib/oeqa/runtime/cases/rust.py index 9bf0312669..39707cf5cf 100644 --- a/meta/lib/oeqa/runtime/cases/rust.py +++ b/meta/lib/oeqa/runtime/cases/rust.py | |||
| @@ -48,3 +48,15 @@ class RustCompileTest(OERuntimeTestCase): | |||
| 48 | status, output = self.target.run('cargo run --manifest-path=/tmp/hello/Cargo.toml') | 48 | status, output = self.target.run('cargo run --manifest-path=/tmp/hello/Cargo.toml') |
| 49 | msg = 'running compiled file failed, output: %s' % output | 49 | msg = 'running compiled file failed, output: %s' % output |
| 50 | self.assertEqual(status, 0, msg=msg) | 50 | self.assertEqual(status, 0, msg=msg) |
| 51 | |||
| 52 | class RustCLibExampleTest(OERuntimeTestCase): | ||
| 53 | @OETestDepends(['ssh.SSHTest.test_ssh']) | ||
| 54 | @OEHasPackage('rust-c-lib-example-bin') | ||
| 55 | def test_rust_c_lib_example(self): | ||
| 56 | cmd = "rust-c-lib-example-bin test" | ||
| 57 | status, output = self.target.run(cmd) | ||
| 58 | msg = 'Exit status was not 0. Output: %s' % output | ||
| 59 | self.assertEqual(status, 0, msg=msg) | ||
| 60 | |||
| 61 | msg = 'Incorrect output: %s' % output | ||
| 62 | self.assertEqual(output, "Hello world in rust from C!", msg=msg) | ||
