mirror of
https://git.yoctoproject.org/poky
synced 2026-02-20 08:29:42 +01:00
oeqa/runtime/cases: Improve dependencies of kernel/gcc/build tests
Mark up these tests as needing a compiler, make and kernel source code as appropriate, the image feature requirements can then be retired. (From OE-Core rev: 9f64e6c25abdf494fb511e9cd401f8dcaa08be2a) (From OE-Core rev: 544c56b6950f0598d5eaf62d9ae9d9de5fcb7eaf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -4,11 +4,12 @@ from oeqa.runtime.case import OERuntimeTestCase
|
||||
from oeqa.core.decorator.depends import OETestDepends
|
||||
from oeqa.core.decorator.oeid import OETestID
|
||||
from oeqa.core.decorator.data import skipIfNotFeature
|
||||
from oeqa.runtime.decorator.package import OEHasPackage
|
||||
|
||||
class KernelModuleTest(OERuntimeTestCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
def setUp(cls):
|
||||
src = os.path.join(cls.tc.runtime_files_dir, 'hellomod.c')
|
||||
dst = '/tmp/hellomod.c'
|
||||
cls.tc.target.copyTo(src, dst)
|
||||
@@ -18,7 +19,7 @@ class KernelModuleTest(OERuntimeTestCase):
|
||||
cls.tc.target.copyTo(src, dst)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
def tearDown(cls):
|
||||
files = '/tmp/Makefile /tmp/hellomod.c'
|
||||
cls.tc.target.run('rm %s' % files)
|
||||
|
||||
@@ -26,6 +27,9 @@ class KernelModuleTest(OERuntimeTestCase):
|
||||
@skipIfNotFeature('tools-sdk',
|
||||
'Test requires tools-sdk to be in IMAGE_FEATURES')
|
||||
@OETestDepends(['gcc.GccCompileTest.test_gcc_compile'])
|
||||
@OEHasPackage(['kernel-devsrc'])
|
||||
@OEHasPackage(['make'])
|
||||
@OEHasPackage(['gcc'])
|
||||
def test_kernel_module(self):
|
||||
cmds = [
|
||||
'cd /usr/src/kernel && make scripts prepare',
|
||||
|
||||
Reference in New Issue
Block a user