summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorAlexandru Palalau <alexandrux.palalau@intel.com>2013-08-20 16:07:43 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-26 11:42:13 +0100
commitfcc59cbcdb1550489d372edf9f465efa7165245f (patch)
tree1aaa6ad669e3800f5980dd1deb583efb45cacda1 /meta/lib
parent186d79a603b5cbf5a93e6f5dbba5f62ed8d4d8d8 (diff)
downloadopenembedded-core-fcc59cbcdb1550489d372edf9f465efa7165245f.tar.gz
openembedded-core-fcc59cbcdb1550489d372edf9f465efa7165245f.tar.bz2
openembedded-core-fcc59cbcdb1550489d372edf9f465efa7165245f.zip
lib/oeqa/runtime: add new skeletoninit test
New test which verifies the usage of skeleton init script available with meta-skeleton layer Signed-off-by: Alexandru Palalau <alexandrux.palalau@intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/skeletoninit.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/meta/lib/oeqa/skeletoninit.py b/meta/lib/oeqa/skeletoninit.py
new file mode 100644
index 0000000000..557e715a3e
--- /dev/null
+++ b/meta/lib/oeqa/skeletoninit.py
@@ -0,0 +1,28 @@
+# This test should cover https://bugzilla.yoctoproject.org/tr_show_case.cgi?case_id=284 testcase
+# Note that the image under test must have meta-skeleton layer in bblayers and IMAGE_INSTALL_append = " service" in local.conf
+
+import unittest
+from oeqa.oetest import oeRuntimeTest
+from oeqa.utils.decorators import *
+
+def setUpModule():
+ if not oeRuntimeTest.hasPackage("service"):
+ skipModule("No service package in image")
+
+
+class SkeletonBasicTest(oeRuntimeTest):
+
+ @skipUnlessPassed('test_ssh')
+ @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager"), "Not appropiate for systemd image")
+ def test_skeleton_availability(self):
+ (status, output) = self.target.run('ls /etc/init.d/skeleton')
+ self.assertEqual(status, 0, msg = "skeleton init script not found. Output:\n%s " % output)
+ (status, output) = self.target.run('ls /usr/sbin/skeleton-test')
+ self.assertEqual(status, 0, msg = "skeleton-test not found. Output:\n%s" % output)
+
+ @skipUnlessPassed('test_skeleton_availability')
+ @unittest.skipIf("systemd" == oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager"), "Not appropiate for systemd image")
+ def test_skeleton_script(self):
+ output1 = self.target.run("/etc/init.d/skeleton start")[1]
+ (status, output2) = self.target.run(oeRuntimeTest.pscmd + ' | grep [s]keleton-test')
+ self.assertEqual(status, 0, msg = "Skeleton script could not be started:\n%s\n%s" % (output1, output2))