summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/kernelmodule.py
diff options
context:
space:
mode:
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',