diff options
author | Daniel Istrate <daniel.alexandrux.istrate@intel.com> | 2015-07-15 17:35:34 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-07-22 23:24:58 +0100 |
commit | 904a3f2c772980b5dc65ef61a0aad23768fcb8dc (patch) | |
tree | cff16ec0910d71b703791e26a2a4957b56ca6bb4 /meta/lib | |
parent | ef84c4bf1d93e9fa674300b80d0442ae1069c473 (diff) | |
download | openembedded-core-904a3f2c772980b5dc65ef61a0aad23768fcb8dc.tar.gz openembedded-core-904a3f2c772980b5dc65ef61a0aad23768fcb8dc.tar.bz2 openembedded-core-904a3f2c772980b5dc65ef61a0aad23768fcb8dc.zip |
oeqa/runtime: Added one runtime testcase in connman.
(testcase 223) Check that only one connmand runs in background.
Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r-- | meta/lib/oeqa/runtime/connman.py | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py index cc537f7766..b04040016f 100644 --- a/meta/lib/oeqa/runtime/connman.py +++ b/meta/lib/oeqa/runtime/connman.py @@ -28,3 +28,26 @@ class ConnmanTest(oeRuntimeTest): if status != 0: print self.service_status("connman") self.fail("No connmand process running") + + @testcase(223) + def test_only_one_connmand_in_background(self): + """ + Summary: Only one connmand in background + Expected: There will be only one connmand instance in background. + Product: BSPs + Author: Alexandru Georgescu <alexandru.c.georgescu@intel.com> + AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com> + """ + + # Make sure that 'connmand' is running in background + (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand') + self.assertEqual(0, status, 'Failed to find "connmand" process running in background.') + + # Start a new instance of 'connmand' + (status, output) = self.target.run('connmand') + self.assertEqual(0, status, 'Failed to start a new "connmand" process.') + + # Make sure that only one 'connmand' is running in background + (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand | wc -l') + self.assertEqual(0, status, 'Failed to find "connmand" process running in background.') + self.assertEqual(1, int(output), 'Found {} connmand processes running, expected 1.'.format(output)) |