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-14 11:14:40 +0000
commitcd81cd155b59e1b75a3ce23375e66131b1bffc1e (patch)
tree216af7aa4b0fe84b40ee90899902c4f41ade0267 /meta/lib/oeqa/runtime/cases/kernelmodule.py
parent8c4ba1afdde782c4a497fa501a61af6bff53375f (diff)
downloadpoky-cd81cd155b59e1b75a3ce23375e66131b1bffc1e.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. (From OE-Core rev: 9f64e6c25abdf494fb511e9cd401f8dcaa08be2a) 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
4from oeqa.core.decorator.depends import OETestDepends 4from oeqa.core.decorator.depends import OETestDepends
5from oeqa.core.decorator.oeid import OETestID 5from oeqa.core.decorator.oeid import OETestID
6from oeqa.core.decorator.data import skipIfNotFeature 6from oeqa.core.decorator.data import skipIfNotFeature
7from oeqa.runtime.decorator.package import OEHasPackage
7 8
8class KernelModuleTest(OERuntimeTestCase): 9class KernelModuleTest(OERuntimeTestCase):
9 10
10 @classmethod 11 @classmethod
11 def setUpClass(cls): 12 def setUp(cls):
12 src = os.path.join(cls.tc.runtime_files_dir, 'hellomod.c') 13 src = os.path.join(cls.tc.runtime_files_dir, 'hellomod.c')
13 dst = '/tmp/hellomod.c' 14 dst = '/tmp/hellomod.c'
14 cls.tc.target.copyTo(src, dst) 15 cls.tc.target.copyTo(src, dst)
@@ -18,7 +19,7 @@ class KernelModuleTest(OERuntimeTestCase):
18 cls.tc.target.copyTo(src, dst) 19 cls.tc.target.copyTo(src, dst)
19 20
20 @classmethod 21 @classmethod
21 def tearDownClass(cls): 22 def tearDown(cls):
22 files = '/tmp/Makefile /tmp/hellomod.c' 23 files = '/tmp/Makefile /tmp/hellomod.c'
23 cls.tc.target.run('rm %s' % files) 24 cls.tc.target.run('rm %s' % files)
24 25
@@ -26,6 +27,9 @@ class KernelModuleTest(OERuntimeTestCase):
26 @skipIfNotFeature('tools-sdk', 27 @skipIfNotFeature('tools-sdk',
27 'Test requires tools-sdk to be in IMAGE_FEATURES') 28 'Test requires tools-sdk to be in IMAGE_FEATURES')
28 @OETestDepends(['gcc.GccCompileTest.test_gcc_compile']) 29 @OETestDepends(['gcc.GccCompileTest.test_gcc_compile'])
30 @OEHasPackage(['kernel-devsrc'])
31 @OEHasPackage(['make'])
32 @OEHasPackage(['gcc'])
29 def test_kernel_module(self): 33 def test_kernel_module(self):
30 cmds = [ 34 cmds = [
31 'cd /usr/src/kernel && make scripts prepare', 35 'cd /usr/src/kernel && make scripts prepare',