diff options
| -rw-r--r-- | meta/lib/oeqa/runtime/connman.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py index b592ecca04..c03688206f 100644 --- a/meta/lib/oeqa/runtime/connman.py +++ b/meta/lib/oeqa/runtime/connman.py | |||
| @@ -9,6 +9,13 @@ def setUpModule(): | |||
| 9 | 9 | ||
| 10 | class ConnmanTest(oeRuntimeTest): | 10 | class ConnmanTest(oeRuntimeTest): |
| 11 | 11 | ||
| 12 | def service_status(self, service): | ||
| 13 | if oeRuntimeTest.hasFeature("systemd"): | ||
| 14 | (status, output) = self.target.run('systemctl status -l %s' % service) | ||
| 15 | return output | ||
| 16 | else: | ||
| 17 | return "Unable to get status or logs for %s" % service | ||
| 18 | |||
| 12 | @skipUnlessPassed('test_ssh') | 19 | @skipUnlessPassed('test_ssh') |
| 13 | def test_connmand_help(self): | 20 | def test_connmand_help(self): |
| 14 | (status, output) = self.target.run('/usr/sbin/connmand --help') | 21 | (status, output) = self.target.run('/usr/sbin/connmand --help') |
| @@ -18,4 +25,6 @@ class ConnmanTest(oeRuntimeTest): | |||
| 18 | @skipUnlessPassed('test_connmand_help') | 25 | @skipUnlessPassed('test_connmand_help') |
| 19 | def test_connmand_running(self): | 26 | def test_connmand_running(self): |
| 20 | (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand') | 27 | (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand') |
| 21 | self.assertEqual(status, 0, msg="no connmand process, ps output: %s" % self.target.run(oeRuntimeTest.pscmd)[1]) | 28 | if status != 0: |
| 29 | print self.service_status("connman") | ||
| 30 | self.fail("No connmand process running") | ||
