-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
infrawptrunnerThe automated test runner, commonly called through ./wpt runThe automated test runner, commonly called through ./wpt run
Description
We currently rely on our own log messages:
wpt/tools/wptrunner/wptrunner/testrunner.py
Lines 197 to 203 in f1c69d8
| # Ensure that when we start this in a new process we have the global lock | |
| # in the logging module unlocked | |
| release_mozlog_lock() | |
| proc_name = mpcontext.get_context().current_process().name | |
| logger = structuredlog.StructuredLogger(proc_name) | |
| logger.add_handler(LogMessageHandler(send_message)) |
However, mozlog actually provides its own multiprocessing logger support which we could use:
wpt/tools/third_party_modified/mozlog/mozlog/proxy.py
Lines 40 to 46 in f1c69d8
| class QueuedProxyLogger(StructuredLogger): | |
| """Logger that logs via a queue. | |
| This is intended for multiprocessing use cases where there are | |
| some subprocesses which want to share a log handler with the main thread, | |
| without the overhead of having a multiprocessing lock for all logger | |
| access.""" |
This was added by @jgraham back in 2017: mozilla-firefox/firefox@995f6ab, and used in the server from 7c178d2 until 8a2f868.
I don't know if there was any reason why the test runner itself never used this, rather reimplementing it itself?
Metadata
Metadata
Assignees
Labels
infrawptrunnerThe automated test runner, commonly called through ./wpt runThe automated test runner, commonly called through ./wpt run