diff options
-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): | |||
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)) | ||