poky/meta/lib/oeqa/runtime/cases/connman.py
Richard Purdie c7592b0147 oeqa: Drop OETestID
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>
2019-05-09 16:31:55 +01:00

28 lines
1.1 KiB
Python

from oeqa.runtime.case import OERuntimeTestCase
from oeqa.core.decorator.depends import OETestDepends
from oeqa.runtime.decorator.package import OEHasPackage
class ConnmanTest(OERuntimeTestCase):
def service_status(self, service):
if 'systemd' in self.tc.td['DISTRO_FEATURES']:
(_, output) = self.target.run('systemctl status -l %s' % service)
return output
else:
return "Unable to get status or logs for %s" % service
@OETestDepends(['ssh.SSHTest.test_ssh'])
@OEHasPackage(["connman"])
def test_connmand_help(self):
(status, output) = self.target.run('/usr/sbin/connmand --help')
msg = 'Failed to get connman help. Output: %s' % output
self.assertEqual(status, 0, msg=msg)
@OETestDepends(['connman.ConnmanTest.test_connmand_help'])
def test_connmand_running(self):
cmd = '%s | grep [c]onnmand' % self.tc.target_cmds['ps']
(status, output) = self.target.run(cmd)
if status != 0:
self.logger.info(self.service_status("connman"))
self.fail("No connmand process running")