Hi Francisco, There is no need to check the ret.status of runCmd. If ret.status is other than 0 runCmd will throw an error. If you want to catch the ret.status of runCmd when you expect the command to fail you should use runCmd('cmd', ignore_status=True).
Please make sure you pay close attention to what you are testing here. Leonardo pointed out in the bug that "It is important to notice that the server was CORRECTLY stopped, just the extra message is wrong." So the server is stopped correctly, you should check only that the extra message is not displayed or the correct message is displayed instead. --Daniel -----Original Message----- From: openembedded-core-boun...@lists.openembedded.org [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of Francisco Pedraza Sent: Saturday, February 20, 2016 00:06 To: openembedded-core@lists.openembedded.org Cc: Pedraza Gonzalez, Francisco J <francisco.j.pedraza.gonza...@intel.com> Subject: [OE-core] [PATCHv2 2/2] oeqa/selftest/prservice: Added new TC: check pr-server starts and stop correctly on localhost. This test case validates if prservice start and stop properly the server. Using bitbake commands also validates the exit status. [YOCTO #8258] Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonza...@intel.com> --- meta/lib/oeqa/selftest/prservice.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/meta/lib/oeqa/selftest/prservice.py b/meta/lib/oeqa/selftest/prservice.py index f22288e..66638de 100644 --- a/meta/lib/oeqa/selftest/prservice.py +++ b/meta/lib/oeqa/selftest/prservice.py @@ -9,9 +9,10 @@ import oeqa.utils.ftools as ftools from oeqa.selftest.base import oeSelfTest from oeqa.utils.commands import runCmd, bitbake, get_bb_var from oeqa.utils.decorators import testcase +from oeqa.utils.network import get_free_port class BitbakePrTests(oeSelfTest): - + def get_pr_version(self, package_name): pkgdata_dir = get_bb_var('PKGDATA_DIR') package_data_file = os.path.join(pkgdata_dir, 'runtime', package_name) @@ -119,3 +120,13 @@ class BitbakePrTests(oeSelfTest): @testcase(936) def test_pr_service_ipk_arch_indep(self): self.run_test_pr_service('xcursor-transparent-theme', 'ipk', 'do_package') + + @testcase(1419) + def test_stopping_prservice_message(self): + port = get_free_port() + + runCmd('bitbake-prserv --host localhost --port %s --loglevel=DEBUG --start' % port) + ret = runCmd('bitbake-prserv --host localhost --port %s + --loglevel=DEBUG --stop' % port) + + self.assertEqual(ret.status, 0) + -- 2.5.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core