summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-16 09:33:28 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-11-24 22:02:47 +0000
commit1c88c939f8448527ad908d3fecad549bfd65a161 (patch)
treeab27da2c3c1dba05529804c1a66edf8dd670810b /meta/lib/oeqa/runtime
parent7692a65189c71748af1d792dda7ee08fde7e561a (diff)
downloadpoky-1c88c939f8448527ad908d3fecad549bfd65a161.tar.gz
oeqa/utils/httpserver: Rework to avoid hangs and improve logging
testimage.bbclass installs a SIGTERM handler which conflicts with the use of multiprocessing here. This is paritcularly problematic if the http service is terminated before its started and hence before its had a chance to reset the default signal handler (as the code was written). Instead, temporarily remove testimage's handler whilst forking the http process which means the correct handler is installed and won't deadlock. Also take the opportunity to add in some log messages about the server start and shutdown so that future debugging is easier and its clearer what the code is doing. (From OE-Core rev: cc0471439aa0085ca87deccf061c5b676ef12388) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/runtime')
-rw-r--r--meta/lib/oeqa/runtime/cases/apt.py2
-rw-r--r--meta/lib/oeqa/runtime/cases/dnf.py2
-rw-r--r--meta/lib/oeqa/runtime/cases/opkg.py2
3 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oeqa/runtime/cases/apt.py b/meta/lib/oeqa/runtime/cases/apt.py
index 8d4dd35c57..793143f72c 100644
--- a/meta/lib/oeqa/runtime/cases/apt.py
+++ b/meta/lib/oeqa/runtime/cases/apt.py
@@ -18,7 +18,7 @@ class AptRepoTest(AptTest):
18 @classmethod 18 @classmethod
19 def setUpClass(cls): 19 def setUpClass(cls):
20 service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_DEB'], 'all') 20 service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_DEB'], 'all')
21 cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip) 21 cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip, logger=cls.tc.logger)
22 cls.repo_server.start() 22 cls.repo_server.start()
23 23
24 @classmethod 24 @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/dnf.py b/meta/lib/oeqa/runtime/cases/dnf.py
index e93a1cea06..c1ed39d776 100644
--- a/meta/lib/oeqa/runtime/cases/dnf.py
+++ b/meta/lib/oeqa/runtime/cases/dnf.py
@@ -55,7 +55,7 @@ class DnfRepoTest(DnfTest):
55 @classmethod 55 @classmethod
56 def setUpClass(cls): 56 def setUpClass(cls):
57 cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-testimage-repo'), 57 cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-testimage-repo'),
58 cls.tc.target.server_ip) 58 cls.tc.target.server_ip, logger=cls.tc.logger)
59 cls.repo_server.start() 59 cls.repo_server.start()
60 60
61 @classmethod 61 @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/opkg.py b/meta/lib/oeqa/runtime/cases/opkg.py
index 50de8001c3..29e990269b 100644
--- a/meta/lib/oeqa/runtime/cases/opkg.py
+++ b/meta/lib/oeqa/runtime/cases/opkg.py
@@ -21,7 +21,7 @@ class OpkgRepoTest(OpkgTest):
21 if cls.tc.td["MULTILIB_VARIANTS"]: 21 if cls.tc.td["MULTILIB_VARIANTS"]:
22 allarchfeed = cls.tc.td["TUNE_PKGARCH"] 22 allarchfeed = cls.tc.td["TUNE_PKGARCH"]
23 service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_IPK'], allarchfeed) 23 service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_IPK'], allarchfeed)
24 cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip) 24 cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip, logger=cls.tc.logger)
25 cls.repo_server.start() 25 cls.repo_server.start()
26 26
27 @classmethod 27 @classmethod