mirror of
git://git.yoctoproject.org/poky.git
synced 2025-07-05 05:04:44 +02:00

These IDs refer to testopia which we're no longer using. We would now use the test names to definitively reference tests and the IDs can be dropped, along with their supporting code. (From OE-Core rev: 8e2d0575e4e7036b5f60e632f377a8ab2b96ead8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
34 lines
1.2 KiB
Python
34 lines
1.2 KiB
Python
import os
|
|
|
|
from oeqa.runtime.case import OERuntimeTestCase
|
|
from oeqa.core.decorator.depends import OETestDepends
|
|
from oeqa.core.decorator.data import skipIfNotFeature
|
|
from oeqa.runtime.decorator.package import OEHasPackage
|
|
|
|
class StapTest(OERuntimeTestCase):
|
|
|
|
@classmethod
|
|
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 tearDown(cls):
|
|
files = '/tmp/hello.stp'
|
|
cls.tc.target.run('rm %s' % files)
|
|
|
|
@skipIfNotFeature('tools-profile',
|
|
'Test requires tools-profile to be in IMAGE_FEATURES')
|
|
@OETestDepends(['kernelmodule.KernelModuleTest.test_kernel_module'])
|
|
@OEHasPackage(['systemtap'])
|
|
def test_stap(self):
|
|
cmds = [
|
|
'cd /usr/src/kernel && make scripts prepare',
|
|
'cd /lib/modules/`uname -r` && (if [ ! -e build ]; then ln -s /usr/src/kernel build; fi)',
|
|
'stap --disable-cache -DSTP_NO_VERREL_CHECK /tmp/hello.stp'
|
|
]
|
|
for cmd in cmds:
|
|
status, output = self.target.run(cmd, 900)
|
|
self.assertEqual(status, 0, msg='\n'.join([cmd, output]))
|