summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/kernelmodule.py
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-09 09:55:40 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-13 15:18:28 +0000
commit9f64e6c25abdf494fb511e9cd401f8dcaa08be2a (patch)
tree38e94c9b443ed5514285c79e5d03de0d2d970616 /meta/lib/oeqa/runtime/cases/kernelmodule.py
parent4966bc33845752eb0aeae54b72e8ba0146a7ed52 (diff)
downloadopenembedded-core-contrib-9f64e6c25abdf494fb511e9cd401f8dcaa08be2a.tar.gz
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/kernelmodule.py')
-rw-r--r--meta/lib/oeqa/runtime/cases/kernelmodule.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/meta/lib/oeqa/runtime/cases/kernelmodule.py b/meta/lib/oeqa/runtime/cases/kernelmodule.py
index de1a5aa445..27a2c35b71 100644
--- a/meta/lib/oeqa/runtime/cases/kernelmodule.py
+++ b/meta/lib/oeqa/runtime/cases/kernelmodule.py
@@ -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',