diff options
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/rust.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/rust.py b/meta/lib/oeqa/runtime/cases/rust.py index 186bb0d79e..c9c60e16fd 100644 --- a/meta/lib/oeqa/runtime/cases/rust.py +++ b/meta/lib/oeqa/runtime/cases/rust.py | |||
@@ -20,6 +20,8 @@ class RustCompileTest(OERuntimeTestCase): | |||
20 | def tearDown(cls): | 20 | def tearDown(cls): |
21 | files = '/tmp/test.rs /tmp/test' | 21 | files = '/tmp/test.rs /tmp/test' |
22 | cls.tc.target.run('rm %s' % files) | 22 | cls.tc.target.run('rm %s' % files) |
23 | dirs = '/tmp/hello' | ||
24 | cls.tc.target.run('rm -r %s' % dirs) | ||
23 | 25 | ||
24 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 26 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
25 | @OEHasPackage(['rust']) | 27 | @OEHasPackage(['rust']) |
@@ -32,6 +34,21 @@ class RustCompileTest(OERuntimeTestCase): | |||
32 | msg = 'running compiled file failed, output: %s' % output | 34 | msg = 'running compiled file failed, output: %s' % output |
33 | self.assertEqual(status, 0, msg=msg) | 35 | self.assertEqual(status, 0, msg=msg) |
34 | 36 | ||
37 | @OETestDepends(['ssh.SSHTest.test_ssh']) | ||
38 | @OEHasPackage(['cargo']) | ||
39 | def test_cargo_compile(self): | ||
40 | status, output = self.target.run('cargo new /tmp/hello') | ||
41 | msg = 'cargo new failed, output: %s' % output | ||
42 | self.assertEqual(status, 0, msg=msg) | ||
43 | |||
44 | status, output = self.target.run('cargo build --manifest-path=/tmp/hello/Cargo.toml') | ||
45 | msg = 'cargo build failed, output: %s' % output | ||
46 | self.assertEqual(status, 0, msg=msg) | ||
47 | |||
48 | status, output = self.target.run('cargo run --manifest-path=/tmp/hello/Cargo.toml') | ||
49 | msg = 'running compiled file failed, output: %s' % output | ||
50 | self.assertEqual(status, 0, msg=msg) | ||
51 | |||
35 | class RustHelloworldTest(OERuntimeTestCase): | 52 | class RustHelloworldTest(OERuntimeTestCase): |
36 | @OETestDepends(['ssh.SSHTest.test_ssh']) | 53 | @OETestDepends(['ssh.SSHTest.test_ssh']) |
37 | @OEHasPackage(['rust-hello-world']) | 54 | @OEHasPackage(['rust-hello-world']) |