diff options
author | André Draszik <git@andred.net> | 2019-12-12 21:52:09 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-16 23:25:49 +0000 |
commit | 6f637e973a252d8bfd1a4d79d5e4f9d9c850f0c4 (patch) | |
tree | 6dbe96d7bd4b289e17613af480b448de96f258a1 /meta/lib/oeqa | |
parent | 804489d993556cdafb4d03c2abc6a76ad0e09b87 (diff) | |
download | poky-6f637e973a252d8bfd1a4d79d5e4f9d9c850f0c4.tar.gz |
oeqa/utils/httpserver: allow to pass in listening port
Being able to specify the listening port is useful when
running OEQA from within a docker container, e.g.
crops or any other solution.
In that case, a port on the outside must be mapped to a
specific port inside the container. If no port is specified
for the http server module in this case, the http server
would choose a random port, which is unlikely to be mapped
and thus won't be reachable from the outside.
(From OE-Core rev: e54391ca9068661693275fbfcfded9bc0b2606f3)
Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/utils/httpserver.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/httpserver.py b/meta/lib/oeqa/utils/httpserver.py index aa435590f0..58d3c3b3f8 100644 --- a/meta/lib/oeqa/utils/httpserver.py +++ b/meta/lib/oeqa/utils/httpserver.py | |||
@@ -22,10 +22,10 @@ class HTTPRequestHandler(http.server.SimpleHTTPRequestHandler): | |||
22 | 22 | ||
23 | class HTTPService(object): | 23 | class HTTPService(object): |
24 | 24 | ||
25 | def __init__(self, root_dir, host='', logger=None): | 25 | def __init__(self, root_dir, host='', port=0, logger=None): |
26 | self.root_dir = root_dir | 26 | self.root_dir = root_dir |
27 | self.host = host | 27 | self.host = host |
28 | self.port = 0 | 28 | self.port = port |
29 | self.logger = logger | 29 | self.logger = logger |
30 | 30 | ||
31 | def start(self): | 31 | def start(self): |