summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/cases/skeletoninit.py
diff options
context:
space:
mode:
authorMariano Lopez <mariano.lopez@linux.intel.com>2016-11-01 07:48:16 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:20 +0000
commitb569aa0e0056a97b29577f5bda611ef3dd539db3 (patch)
tree64f4d7856959435abfc7c49258688f64861f6d7c /meta/lib/oeqa/runtime/cases/skeletoninit.py
parent3857e5c91da678d7bdc07712a1df9daa14354986 (diff)
downloadpoky-b569aa0e0056a97b29577f5bda611ef3dd539db3.tar.gz
oeqa/runtime/cases: Migrate runtime tests.
This migrates current runtime test suite to be used with the new framework. [YOCTO #10234] (From OE-Core rev: b39c61f2d442c79d03b73e8ffd104996fcb2177e) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime/cases/skeletoninit.py')
-rw-r--r--meta/lib/oeqa/runtime/cases/skeletoninit.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/cases/skeletoninit.py b/meta/lib/oeqa/runtime/cases/skeletoninit.py
new file mode 100644
index 0000000000..4fdcf033a3
--- /dev/null
+++ b/meta/lib/oeqa/runtime/cases/skeletoninit.py
@@ -0,0 +1,33 @@
1# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=284
2# testcase. Image under test must have meta-skeleton layer in bblayers and
3# IMAGE_INSTALL_append = " service" in local.conf
4from oeqa.runtime.case import OERuntimeTestCase
5from oeqa.core.decorator.depends import OETestDepends
6from oeqa.core.decorator.oeid import OETestID
7from oeqa.core.decorator.data import skipIfDataVar
8from oeqa.runtime.decorator.package import OEHasPackage
9
10class SkeletonBasicTest(OERuntimeTestCase):
11
12 @OETestDepends(['ssh.SSHTest.test_ssh'])
13 @OEHasPackage(['service'])
14 @skipIfDataVar('VIRTUAL-RUNTIME_init_manager', 'systemd',
15 'Not appropiate for systemd image')
16 def test_skeleton_availability(self):
17 status, output = self.target.run('ls /etc/init.d/skeleton')
18 msg = 'skeleton init script not found. Output:\n%s' % output
19 self.assertEqual(status, 0, msg=msg)
20
21 status, output = self.target.run('ls /usr/sbin/skeleton-test')
22 msg = 'skeleton-test not found. Output:\n%s' % output
23 self.assertEqual(status, 0, msg=msg)
24
25 @OETestID(284)
26 @OETestDepends(['skeletoninit.SkeletonBasicTest.test_skeleton_availability'])
27 def test_skeleton_script(self):
28 output1 = self.target.run("/etc/init.d/skeleton start")[1]
29 cmd = '%s | grep [s]keleton-test' % self.tc.target_cmds['ps']
30 status, output2 = self.target.run(cmd)
31 msg = ('Skeleton script could not be started:'
32 '\n%s\n%s' % (output1, output2))
33 self.assertEqual(status, 0, msg=msg)