diff options
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/kernelmodule.py')
-rw-r--r-- | meta/lib/oeqa/runtime/cases/kernelmodule.py | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/meta/lib/oeqa/runtime/cases/kernelmodule.py b/meta/lib/oeqa/runtime/cases/kernelmodule.py index 11ad7b7f01..9c42fcc586 100644 --- a/meta/lib/oeqa/runtime/cases/kernelmodule.py +++ b/meta/lib/oeqa/runtime/cases/kernelmodule.py @@ -1,14 +1,20 @@ +# +# Copyright OpenEmbedded Contributors +# +# SPDX-License-Identifier: MIT +# + import os 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,17 +24,19 @@ 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) - @OETestID(1541) @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', + 'cd /usr/src/kernel && make scripts prepare', 'cd /tmp && make', 'cd /tmp && insmod hellomod.ko', 'lsmod | grep hellomod', |