summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/httpserver.py
Commit message (Collapse)AuthorAgeFilesLines
* httpserver: add error handler that write to the loggerRoss Burton2023-02-011-0/+6
| | | | | | | (From OE-Core rev: a4bcca3123685f410fc99e5cc23f2b8f39fd0a63) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/httpserver: connect up the request loggingRoss Burton2023-02-011-5/+16
| | | | | | | | | | | | | | | | Call logger.info() in the log_message handler so that we get request logging, and hopefully even error messages. Create a child logger to be neat and compartmentalise the logging. Add a __main__ entrypoint so this class can be exercised outside of oeqa. Remove unused traceback import. (From OE-Core rev: 8fc939d942cec1662ca386b87c63f167bb10fd05) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib: Add copyright statements to files without oneRichard Purdie2022-08-121-0/+2
| | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also add license identifiers as MIT if there isn't one. (From OE-Core rev: bb731d1f3d2a1d50ec0aed864dbca54cf795b040) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/httpserver: allow to pass in listening portAndré Draszik2019-12-161-2/+2
| | | | | | | | | | | | | | | | 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>
* meta/lib+scripts: Convert to SPDX license headersRichard Purdie2019-05-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. (From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/httpserver: Rework to avoid hangs and improve loggingRichard Purdie2018-11-161-8/+29
| | | | | | | | | | | | | | | | | | 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: 0762b6021b87ceb1f37952f3a6d64a36e99ae6a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/httpserver.py: HTTPServer enable thread connection handlingAníbal Limón2016-08-101-1/+2
| | | | | | | | | | HTTPServer now supports multiple connections using Python threads. (From OE-Core rev: 1d45b7bd611b900bc00530144ec0634307b1314f) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/lib: Complete transition to python3Richard Purdie2016-06-021-3/+3
| | | | | | | | | This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. (From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/httpserver: Reset SIGTERM handlerRichard Purdie2014-08-231-0/+2
| | | | | | | | | | With bitbake-worker installing a SIGTERM handler, we now need to reset the one here to ensure that when this process shuts down, it doesn't take the rest of the task with it. This does appear to be the only place in OE that we have this problem. (From OE-Core rev: e1ac67d6470dde70239ca0430b18ca0bffbc0295) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/runtime: smart: serve repo on host ip only and increase timeoutStefan Stanacar2013-09-031-2/+3
| | | | | | | | | | | Don't start the http server on 0.0.0.0, listen on host ip (end of tap interface) only. Also use the timeout option (default is 300s for ssh commands) for all the commands run in this module (mostly because smart update timeouts on mips). (From OE-Core rev: 8c272641ef3e8410f331ca4133d28dea8f36e4f4) Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oeqa/utils: new file: httpserver.py useful for serving files over HTTP ↵Mihai Lindner2013-08-261-0/+32
to the target It can be used by smart repo/channel tests to serve deploy_dir. (From OE-Core rev: e38e18d6923cc3db50b56fa3fc64081fe4aa8669) Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com> Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>