Add runtime test for import test from other layers
v2 cover Add runtime test for import test from other layers
From: Mariano Lopez <[email protected]>
Changes in v2:
- Fix features needed for bitbake
- Use full-cmdline instead of sato
- Tested in local autobuilders before submitting the patch
The following changes since commit 039f47ad197a9a53109c9f3deadd9c35e62c056d:
uclibc: remove meta-yocto-bsp append (2016-07-26 08:56:32 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mariano/bug9764v2
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug9764v2
Mariano Lopez (1):
selftest/runtime-test.py: Add test for import test from other layers
meta-selftest/lib/oeqa/runtime/selftest.json | 6 +++++
meta-selftest/lib/oeqa/runtime/selftest.py | 31 ++++++++++++++++++++++
.../selftest/{testexport.py => runtime-test.py} | 20 ++++++++++++++
3 files changed, 57 insertions(+)
create mode 100644 meta-selftest/lib/oeqa/runtime/selftest.json
create mode 100644 meta-selftest/lib/oeqa/runtime/selftest.py
rename meta/lib/oeqa/selftest/{testexport.py => runtime-test.py} (74%)Signature · 1 line
2.6.6
PATCH v2 1/1 selftest/runtime-test.py: Add test for import test from other layers
From: Mariano Lopez <[email protected]>
There are some features in testimage/testexport that are not tested; this might lead to break some of these features without notice.
This adds a new test in order to test two features of testimage:
- Import test from other layers.
- Install/Unistall in the DUT without a package manager.
[YOCTO #9764]
[YOCTO #9766]
---
meta-selftest/lib/oeqa/runtime/selftest.json | 6 +++++
meta-selftest/lib/oeqa/runtime/selftest.py | 31 ++++++++++++++++++++++
.../selftest/{testexport.py => runtime-test.py} | 20 ++++++++++++++
3 files changed, 57 insertions(+)
create mode 100644 meta-selftest/lib/oeqa/runtime/selftest.json
create mode 100644 meta-selftest/lib/oeqa/runtime/selftest.py
rename meta/lib/oeqa/selftest/{testexport.py => runtime-test.py} (74%)meta-selftest/lib/oeqa/runtime/selftest.json new file +6 -0
@@ -0,0 +1,6 @@ +{ + "test_install_package": { + "pkg": "socat", + "rm": true + } +}
meta-selftest/lib/oeqa/runtime/selftest.py new file +31 -0
@@ -0,0 +1,31 @@ +from oeqa.oetest import oeRuntimeTest, skipModule +from oeqa.utils.decorators import * + +class Selftest(oeRuntimeTest): + + @skipUnlessPassed("test_ssh") + def test_install_package(self): + """ + Summary: Check basic package installation functionality. + Expected: 1. Before the test socat must be installed using scp. + 2. After the test socat must be unistalled using ssh. + This can't be checked in this test. + Product: oe-core + Author: Mariano Lopez <[email protected]> + """ + + (status, output) = self.target.run("socat -V") + self.assertEqual(status, 0, msg="socat is not installed") + + @skipUnlessPassed("test_install_package") + def test_verify_unistall(self): + """ + Summary: Check basic package installation functionality. + Expected: 1. test_install_package must unistall socat. + This test is just to verify that. + Product: oe-core + Author: Mariano Lopez <[email protected]> + """ + + (status, output) = self.target.run("socat -V") + self.assertNotEqual(status, 0, msg="socat is still installed")
meta/lib/oeqa/selftest/runtime-test.py renamed from meta/lib/oeqa/selftest/testexport.py +20 -0
@@ -42,3 +42,23 @@ class TestExport(oeSelfTest): # Verify ping test was succesful failure = True if 'FAIL' in result.output else False self.assertNotEqual(True, failure, 'ping test failed') + + +class TestImage(oeSelfTest): + + def test_testimage_install(self): + """ + Summary: Check install packages functionality for testimage/testexport. + Expected: 1. Import tests from a directory other than meta. + 2. Check install/unistall of socat. + Product: oe-core + Author: Mariano Lopez <[email protected]> + """ + + features = 'INHERIT += "testimage"\n' + features += 'TEST_SUITES = "ping ssh selftest"\n' + self.write_config(features) + + # Build core-image-sato and testimage + bitbake('core-image-full-cmdline socat') + bitbake('-c testimage core-image-full-cmdline')
Signature · 1 line
2.6.6