diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2017-01-19 12:38:06 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-01-23 12:05:21 +0000 |
commit | 6cea270c544ceb14cbd44f4e5f4e51c3a3dcb143 (patch) | |
tree | e2ebab9929dce7ad2f22d8266d31ea4702ce7e4a /meta-selftest/lib/oeqa/runtime/selftest.py | |
parent | 46ce0b5ef3ee623cc9d366f83030363b470ed11e (diff) | |
download | poky-6cea270c544ceb14cbd44f4e5f4e51c3a3dcb143.tar.gz |
selftest/runtime-test.py: Adapt test to use new runtime framework
This adapt the current runtime selftest to use the new runtime
framework.
(From OE-Core rev: cfeec8a59ba03f98944fd3dca1a67d80e7edb4c9)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta-selftest/lib/oeqa/runtime/selftest.py')
-rw-r--r-- | meta-selftest/lib/oeqa/runtime/selftest.py | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/meta-selftest/lib/oeqa/runtime/selftest.py b/meta-selftest/lib/oeqa/runtime/selftest.py deleted file mode 100644 index a7e58ab3d5..0000000000 --- a/meta-selftest/lib/oeqa/runtime/selftest.py +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | import os | ||
2 | |||
3 | from oeqa.oetest import oeRuntimeTest, skipModule | ||
4 | from oeqa.utils.commands import runCmd | ||
5 | from oeqa.utils.decorators import * | ||
6 | |||
7 | class Selftest(oeRuntimeTest): | ||
8 | |||
9 | @skipUnlessPassed("test_ssh") | ||
10 | @tag("selftest_package_install") | ||
11 | def test_install_package(self): | ||
12 | """ | ||
13 | Summary: Check basic package installation functionality. | ||
14 | Expected: 1. Before the test socat must be installed using scp. | ||
15 | 2. After the test socat must be unistalled using ssh. | ||
16 | This can't be checked in this test. | ||
17 | Product: oe-core | ||
18 | Author: Mariano Lopez <mariano.lopez@intel.com> | ||
19 | """ | ||
20 | |||
21 | (status, output) = self.target.run("socat -V") | ||
22 | self.assertEqual(status, 0, msg="socat is not installed") | ||
23 | |||
24 | @skipUnlessPassed("test_install_package") | ||
25 | @tag("selftest_package_install") | ||
26 | def test_verify_unistall(self): | ||
27 | """ | ||
28 | Summary: Check basic package installation functionality. | ||
29 | Expected: 1. test_install_package must unistall socat. | ||
30 | This test is just to verify that. | ||
31 | Product: oe-core | ||
32 | Author: Mariano Lopez <mariano.lopez@intel.com> | ||
33 | """ | ||
34 | |||
35 | (status, output) = self.target.run("socat -V") | ||
36 | self.assertNotEqual(status, 0, msg="socat is still installed") | ||
37 | |||
38 | @tag("selftest_sdk") | ||
39 | def test_sdk(self): | ||
40 | |||
41 | result = runCmd("env -0") | ||
42 | sdk_path = search_sdk_path(result.output) | ||
43 | self.assertTrue(sdk_path, msg="Can't find SDK path") | ||
44 | |||
45 | tar_cmd = os.path.join(sdk_path, "tar") | ||
46 | result = runCmd("%s --help" % tar_cmd) | ||
47 | |||
48 | def search_sdk_path(env): | ||
49 | for line in env.split("\0"): | ||
50 | (key, _, value) = line.partition("=") | ||
51 | if key == "PATH": | ||
52 | for path in value.split(":"): | ||
53 | if "pokysdk" in path: | ||
54 | return path | ||
55 | return "" | ||