diff options
author | Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com> | 2016-02-19 16:05:42 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-28 11:32:59 +0000 |
commit | 8d07e14009c14cad55e6629216684661791af906 (patch) | |
tree | 0b9111613178a7af6dad071b1dec2a12a5595e04 | |
parent | d2a563c32c62908a8c8eb9618f86a3fc9e5fe5bc (diff) | |
download | poky-8d07e14009c14cad55e6629216684661791af906.tar.gz |
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]
(From OE-Core rev: 5125dd2a5c2e382c47ddeaf0327fc7dc39482023)
Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/lib/oeqa/selftest/prservice.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/meta/lib/oeqa/selftest/prservice.py b/meta/lib/oeqa/selftest/prservice.py index f22288eaf6..66638de8f8 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 | |||
9 | from oeqa.selftest.base import oeSelfTest | 9 | from oeqa.selftest.base import oeSelfTest |
10 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var | 10 | from oeqa.utils.commands import runCmd, bitbake, get_bb_var |
11 | from oeqa.utils.decorators import testcase | 11 | from oeqa.utils.decorators import testcase |
12 | from oeqa.utils.network import get_free_port | ||
12 | 13 | ||
13 | class BitbakePrTests(oeSelfTest): | 14 | class BitbakePrTests(oeSelfTest): |
14 | 15 | ||
15 | def get_pr_version(self, package_name): | 16 | def get_pr_version(self, package_name): |
16 | pkgdata_dir = get_bb_var('PKGDATA_DIR') | 17 | pkgdata_dir = get_bb_var('PKGDATA_DIR') |
17 | package_data_file = os.path.join(pkgdata_dir, 'runtime', package_name) | 18 | package_data_file = os.path.join(pkgdata_dir, 'runtime', package_name) |
@@ -119,3 +120,13 @@ class BitbakePrTests(oeSelfTest): | |||
119 | @testcase(936) | 120 | @testcase(936) |
120 | def test_pr_service_ipk_arch_indep(self): | 121 | def test_pr_service_ipk_arch_indep(self): |
121 | self.run_test_pr_service('xcursor-transparent-theme', 'ipk', 'do_package') | 122 | self.run_test_pr_service('xcursor-transparent-theme', 'ipk', 'do_package') |
123 | |||
124 | @testcase(1419) | ||
125 | def test_stopping_prservice_message(self): | ||
126 | port = get_free_port() | ||
127 | |||
128 | runCmd('bitbake-prserv --host localhost --port %s --loglevel=DEBUG --start' % port) | ||
129 | ret = runCmd('bitbake-prserv --host localhost --port %s --loglevel=DEBUG --stop' % port) | ||
130 | |||
131 | self.assertEqual(ret.status, 0) | ||
132 | |||