summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/connman.py
diff options
context:
space:
mode:
authorDaniel Istrate <daniel.alexandrux.istrate@intel.com>2015-07-15 17:35:34 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-07-23 08:48:37 +0100
commit7d01c595c96eb3d67b90caf71050c4e9345257de (patch)
tree05e9e3442575f4b71c6928bcf2df8944baead4c8 /meta/lib/oeqa/runtime/connman.py
parent613cbe5c103dad9eac94246cae99e6edef4c03fe (diff)
downloadpoky-7d01c595c96eb3d67b90caf71050c4e9345257de.tar.gz
oeqa/runtime: Added one runtime testcase in connman.
(testcase 223) Check that only one connmand runs in background. (From OE-Core rev: 904a3f2c772980b5dc65ef61a0aad23768fcb8dc) 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/oeqa/runtime/connman.py')
-rw-r--r--meta/lib/oeqa/runtime/connman.py23
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):
28 if status != 0: 28 if status != 0:
29 print self.service_status("connman") 29 print self.service_status("connman")
30 self.fail("No connmand process running") 30 self.fail("No connmand process running")
31
32 @testcase(223)
33 def test_only_one_connmand_in_background(self):
34 """
35 Summary: Only one connmand in background
36 Expected: There will be only one connmand instance in background.
37 Product: BSPs
38 Author: Alexandru Georgescu <alexandru.c.georgescu@intel.com>
39 AutomatedBy: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
40 """
41
42 # Make sure that 'connmand' is running in background
43 (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand')
44 self.assertEqual(0, status, 'Failed to find "connmand" process running in background.')
45
46 # Start a new instance of 'connmand'
47 (status, output) = self.target.run('connmand')
48 self.assertEqual(0, status, 'Failed to start a new "connmand" process.')
49
50 # Make sure that only one 'connmand' is running in background
51 (status, output) = self.target.run(oeRuntimeTest.pscmd + ' | grep [c]onnmand | wc -l')
52 self.assertEqual(0, status, 'Failed to find "connmand" process running in background.')
53 self.assertEqual(1, int(output), 'Found {} connmand processes running, expected 1.'.format(output))