mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-19 12:59:02 +02: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) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
8c4ba1afdd
commit
cd81cd155b
|
@ -1,7 +1,7 @@
|
|||
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
|
||||
|
||||
from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
|
||||
|
||||
|
@ -13,17 +13,18 @@ class BuildCpioTest(OERuntimeTestCase):
|
|||
cls.project = TargetBuildProject(cls.tc.target,
|
||||
uri,
|
||||
dl_dir = cls.tc.td['DL_DIR'])
|
||||
cls.project.download_archive()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
cls.project.clean()
|
||||
|
||||
@OETestID(205)
|
||||
@skipIfNotFeature('tools-sdk',
|
||||
'Test requires tools-sdk to be in IMAGE_FEATURES')
|
||||
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
||||
@OEHasPackage(['gcc'])
|
||||
@OEHasPackage(['make'])
|
||||
@OEHasPackage(['autoconf'])
|
||||
def test_cpio(self):
|
||||
self.project.download_archive()
|
||||
self.project.run_configure()
|
||||
self.project.run_make()
|
||||
self.project.run_install()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
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
|
||||
|
||||
from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
|
||||
|
||||
|
@ -13,16 +13,17 @@ class GalculatorTest(OERuntimeTestCase):
|
|||
cls.project = TargetBuildProject(cls.tc.target,
|
||||
uri,
|
||||
dl_dir = cls.tc.td['DL_DIR'])
|
||||
cls.project.download_archive()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
cls.project.clean()
|
||||
|
||||
@OETestID(1526)
|
||||
@skipIfNotFeature('tools-sdk',
|
||||
'Test requires tools-sdk to be in IMAGE_FEATURES')
|
||||
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
||||
@OEHasPackage(['gcc'])
|
||||
@OEHasPackage(['make'])
|
||||
@OEHasPackage(['autoconf'])
|
||||
def test_galculator(self):
|
||||
self.project.download_archive()
|
||||
self.project.run_configure()
|
||||
self.project.run_make()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
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
|
||||
|
||||
from oeqa.runtime.utils.targetbuildproject import TargetBuildProject
|
||||
|
||||
|
@ -14,21 +14,19 @@ class BuildLzipTest(OERuntimeTestCase):
|
|||
cls.project = TargetBuildProject(cls.tc.target,
|
||||
uri,
|
||||
dl_dir = cls.tc.td['DL_DIR'])
|
||||
cls.project.download_archive()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
cls.project.clean()
|
||||
|
||||
@OETestID(206)
|
||||
@skipIfNotFeature('tools-sdk',
|
||||
'Test requires tools-sdk to be in IMAGE_FEATURES')
|
||||
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
||||
@OEHasPackage(['gcc'])
|
||||
@OEHasPackage(['make'])
|
||||
@OEHasPackage(['autoconf'])
|
||||
def test_lzip(self):
|
||||
self.project.download_archive()
|
||||
self.project.run_configure()
|
||||
self.project.run_make()
|
||||
self.project.run_install()
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(self):
|
||||
self.project.clean()
|
||||
|
|
|
@ -3,12 +3,12 @@ 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 GccCompileTest(OERuntimeTestCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
def setUp(cls):
|
||||
dst = '/tmp/'
|
||||
src = os.path.join(cls.tc.files_dir, 'test.c')
|
||||
cls.tc.target.copyTo(src, dst)
|
||||
|
@ -20,14 +20,13 @@ class GccCompileTest(OERuntimeTestCase):
|
|||
cls.tc.target.copyTo(src, dst)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
def tearDown(cls):
|
||||
files = '/tmp/test.c /tmp/test.o /tmp/test /tmp/testmakefile'
|
||||
cls.tc.target.run('rm %s' % files)
|
||||
|
||||
@OETestID(203)
|
||||
@skipIfNotFeature('tools-sdk',
|
||||
'Test requires tools-sdk to be in IMAGE_FEATURES')
|
||||
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
||||
@OEHasPackage(['gcc'])
|
||||
def test_gcc_compile(self):
|
||||
status, output = self.target.run('gcc /tmp/test.c -o /tmp/test -lm')
|
||||
msg = 'gcc compile failed, output: %s' % output
|
||||
|
@ -38,9 +37,8 @@ class GccCompileTest(OERuntimeTestCase):
|
|||
self.assertEqual(status, 0, msg=msg)
|
||||
|
||||
@OETestID(200)
|
||||
@skipIfNotFeature('tools-sdk',
|
||||
'Test requires tools-sdk to be in IMAGE_FEATURES')
|
||||
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
||||
@OEHasPackage(['g++'])
|
||||
def test_gpp_compile(self):
|
||||
status, output = self.target.run('g++ /tmp/test.c -o /tmp/test -lm')
|
||||
msg = 'g++ compile failed, output: %s' % output
|
||||
|
@ -51,9 +49,8 @@ class GccCompileTest(OERuntimeTestCase):
|
|||
self.assertEqual(status, 0, msg=msg)
|
||||
|
||||
@OETestID(1142)
|
||||
@skipIfNotFeature('tools-sdk',
|
||||
'Test requires tools-sdk to be in IMAGE_FEATURES')
|
||||
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
||||
@OEHasPackage(['g++'])
|
||||
def test_gpp2_compile(self):
|
||||
status, output = self.target.run('g++ /tmp/test.cpp -o /tmp/test -lm')
|
||||
msg = 'g++ compile failed, output: %s' % output
|
||||
|
@ -64,9 +61,9 @@ class GccCompileTest(OERuntimeTestCase):
|
|||
self.assertEqual(status, 0, msg=msg)
|
||||
|
||||
@OETestID(204)
|
||||
@skipIfNotFeature('tools-sdk',
|
||||
'Test requires tools-sdk to be in IMAGE_FEATURES')
|
||||
@OETestDepends(['ssh.SSHTest.test_ssh'])
|
||||
@OEHasPackage(['gcc'])
|
||||
@OEHasPackage(['make'])
|
||||
def test_make(self):
|
||||
status, output = self.target.run('cd /tmp; make -f testmakefile')
|
||||
msg = 'running make failed, output %s' % output
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -9,13 +9,13 @@ from oeqa.runtime.decorator.package import OEHasPackage
|
|||
class StapTest(OERuntimeTestCase):
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
def setUp(cls):
|
||||
src = os.path.join(cls.tc.runtime_files_dir, 'hello.stp')
|
||||
dst = '/tmp/hello.stp'
|
||||
cls.tc.target.copyTo(src, dst)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
def tearDown(cls):
|
||||
files = '/tmp/hello.stp'
|
||||
cls.tc.target.run('rm %s' % files)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user