Add selftest to test testexport's SDK feature
v2 cover Add selftest to test testexport's SDK feature
From: Mariano Lopez <[email protected]>
This adds a new selftest for testexport in the CI to avoid breaking SDK functionality.
All dependencies are in master now:
Changes in v2:
- Refactor test to avoid environment modification/restoration.
- Tested in local autobuilders.
The following changes since commit 5203cfe6a9b6d12153426bf7b8d9834c9c4efba2:
ref-manual: Removed redundant "and" (2016-08-01 12:15:01 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mariano/bug9765v2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug9765v2
Mariano Lopez (1):
selftest/runtime-test.py: Add test for testexport SDK feature
meta-selftest/lib/oeqa/runtime/selftest.py | 24 +++++++++++++++++ meta/lib/oeqa/selftest/runtime-test.py | 41 ++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+)
Signature · 1 line
2.6.6
PATCH v2 1/1 selftest/runtime-test.py: Add test for testexport SDK feature
From: Mariano Lopez <[email protected]>
This adds test_testexport_sdk() to test the SDK feature of testexport in the CI in order to avoid breaking it.
[YOCTO #9765]
--- meta-selftest/lib/oeqa/runtime/selftest.py | 24 +++++++++++++++++ meta/lib/oeqa/selftest/runtime-test.py | 41 ++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+)
meta-selftest/lib/oeqa/runtime/selftest.py +24 -0
@@ -1,9 +1,13 @@ +import os + from oeqa.oetest import oeRuntimeTest, skipModule +from oeqa.utils.commands import runCmd from oeqa.utils.decorators import * class Selftest(oeRuntimeTest): @skipUnlessPassed("test_ssh") + @tag("selftest_package_install") def test_install_package(self): """ Summary: Check basic package installation functionality.
@@ -18,6 +22,7 @@ class Selftest(oeRuntimeTest): self.assertEqual(status, 0, msg="socat is not installed") @skipUnlessPassed("test_install_package") + @tag("selftest_package_install") def test_verify_unistall(self): """ Summary: Check basic package installation functionality.
@@ -29,3 +34,22 @@ class Selftest(oeRuntimeTest): (status, output) = self.target.run("socat -V") self.assertNotEqual(status, 0, msg="socat is still installed") + + @tag("selftest_sdk") + def test_sdk(self): + + result = runCmd("env -0") + sdk_path = search_sdk_path(result.output) + self.assertTrue(sdk_path, msg="Can't find SDK path") + + tar_cmd = os.path.join(sdk_path, "tar") + result = runCmd("%s --help" % tar_cmd) + +def search_sdk_path(env): + for line in env.split("\0"): + (key, _, value) = line.partition("=") + if key == "PATH": + for path in value.split(":"): + if "pokysdk" in path: + return path + return ""
meta/lib/oeqa/selftest/runtime-test.py +41 -0
53 lines not on this page · raw message
Signature · 1 line
2.6.6