Signed-off-by: Alex Kiernan <[email protected]>
---
meta/lib/oeqa/runtime/cases/rust.py | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/meta/lib/oeqa/runtime/cases/rust.py
b/meta/lib/oeqa/runtime/cases/rust.py
index 186bb0d79e15..e2793f65c932 100644
--- a/meta/lib/oeqa/runtime/cases/rust.py
+++ b/meta/lib/oeqa/runtime/cases/rust.py
@@ -20,6 +20,8 @@ class RustCompileTest(OERuntimeTestCase):
def tearDown(cls):
files = '/tmp/test.rs /tmp/test'
cls.tc.target.run('rm %s' % files)
+ dirs = '/tmp/hello'
+ cls.tc.target.run('rm -r %s' % dirs)
@OETestDepends(['ssh.SSHTest.test_ssh'])
@OEHasPackage(['rust'])
@@ -32,6 +34,21 @@ class RustCompileTest(OERuntimeTestCase):
msg = 'running compiled file failed, output: %s' % output
self.assertEqual(status, 0, msg=msg)
+ @OETestDepends(['ssh.SSHTest.test_ssh'])
+ @OEHasPackage(['cargo'])
+ def test_cargo_compile(self):
+ status, output = self.target.run('cargo new /tmp/hello')
+ msg = 'cargo new failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ status, output = self.target.run('cargo build
--manifest-path=/tmp/hello/Cargo.toml')
+ msg = 'cargo build failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
+ status, output = self.target.run('/tmp/hello/target/debug/hello')
+ msg = 'running compiled file failed, output: %s' % output
+ self.assertEqual(status, 0, msg=msg)
+
class RustHelloworldTest(OERuntimeTestCase):
@OETestDepends(['ssh.SSHTest.test_ssh'])
@OEHasPackage(['rust-hello-world'])
--
2.39.0
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#174867):
https://lists.openembedded.org/g/openembedded-core/message/174867
Mute This Topic: https://lists.openembedded.org/mt/95791143/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-