diff options
Diffstat (limited to 'meta-selftest')
-rw-r--r-- | meta-selftest/lib/oeqa/runtime/selftest.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/meta-selftest/lib/oeqa/runtime/selftest.py b/meta-selftest/lib/oeqa/runtime/selftest.py index b9c9b23bfc..a7e58ab3d5 100644 --- a/meta-selftest/lib/oeqa/runtime/selftest.py +++ b/meta-selftest/lib/oeqa/runtime/selftest.py | |||
@@ -1,9 +1,13 @@ | |||
1 | import os | ||
2 | |||
1 | from oeqa.oetest import oeRuntimeTest, skipModule | 3 | from oeqa.oetest import oeRuntimeTest, skipModule |
4 | from oeqa.utils.commands import runCmd | ||
2 | from oeqa.utils.decorators import * | 5 | from oeqa.utils.decorators import * |
3 | 6 | ||
4 | class Selftest(oeRuntimeTest): | 7 | class Selftest(oeRuntimeTest): |
5 | 8 | ||
6 | @skipUnlessPassed("test_ssh") | 9 | @skipUnlessPassed("test_ssh") |
10 | @tag("selftest_package_install") | ||
7 | def test_install_package(self): | 11 | def test_install_package(self): |
8 | """ | 12 | """ |
9 | Summary: Check basic package installation functionality. | 13 | Summary: Check basic package installation functionality. |
@@ -18,6 +22,7 @@ class Selftest(oeRuntimeTest): | |||
18 | self.assertEqual(status, 0, msg="socat is not installed") | 22 | self.assertEqual(status, 0, msg="socat is not installed") |
19 | 23 | ||
20 | @skipUnlessPassed("test_install_package") | 24 | @skipUnlessPassed("test_install_package") |
25 | @tag("selftest_package_install") | ||
21 | def test_verify_unistall(self): | 26 | def test_verify_unistall(self): |
22 | """ | 27 | """ |
23 | Summary: Check basic package installation functionality. | 28 | Summary: Check basic package installation functionality. |
@@ -29,3 +34,22 @@ class Selftest(oeRuntimeTest): | |||
29 | 34 | ||
30 | (status, output) = self.target.run("socat -V") | 35 | (status, output) = self.target.run("socat -V") |
31 | self.assertNotEqual(status, 0, msg="socat is still installed") | 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 "" | ||