diff options
author | Mariano Lopez <mariano.lopez@linux.intel.com> | 2016-08-01 08:16:33 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-04 15:22:22 +0100 |
commit | 44ae8284d03c79deadd89ee5ee7ca75481ab9e53 (patch) | |
tree | 6ef8a6c89c1bf3eaa434f3beb21b967143bf2328 /meta-selftest | |
parent | d2e5c93dba516b85a10e510e65aaad5d77aaa652 (diff) | |
download | poky-44ae8284d03c79deadd89ee5ee7ca75481ab9e53.tar.gz |
selftest/runtime-test.py: Add test for testexport SDK feature
This adds test_testexport_sdk() to test the SDK feature
of testexport in the CI in order to avoid breaking it.
[YOCTO #9765]
(From OE-Core rev: badec3d10fcdd2d000450ab533caadcff1df5e13)
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 "" | ||