From: Daniel Istrate Date: Wed, 15 Jul 2015 14:35:34 +0000 (+0300) Subject: oeqa/runtime: Added one runtime testcase in connman. X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~29664 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=904a3f2c772980b5dc65ef61a0aad23768fcb8dc;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git oeqa/runtime: Added one runtime testcase in connman. (testcase 223) Check that only one connmand runs in background. Signed-off-by: Daniel Istrate Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- diff --git a/meta/lib/oeqa/runtime/connman.py b/meta/lib/oeqa/runtime/connman.py index cc537f7766b..b04040016f3 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 + AutomatedBy: Daniel Istrate + """ + + # 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))