Skip to content

Commit 7b53a7e

Browse files
Reland "[wptrunner] Log which browser (PID) ran each test (#45472)"
This is an identical reland of #44716; #44736 fixed the underlying regression. --- `mozlog` allows `process_output` events to be interspersed between any `test_*` events [0]. When running tests in parallel, there's currently no structured way to tell which test a `process_event` corresponds to, which prevents us from extracting per-test browser logs. (The required `pid` field is unhelpfully that of the main `testrunner` process.) Log the browser PID during `test_end` as `extra.browser_pid` so that it can be joined against `process_output`'s `process` field. [0]: https://firefox-source-docs.mozilla.org/mozbase/mozlog.html#testsuite-protocol
1 parent e02118b commit 7b53a7e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/wptrunner/wptrunner/testrunner.py

+2
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,8 @@ def test_ended(self, test, results):
773773
test.max_assertion_count)
774774

775775
file_result.extra["test_timeout"] = test.timeout * self.executor_kwargs['timeout_multiplier']
776+
if self.browser.browser_pid:
777+
file_result.extra["browser_pid"] = self.browser.browser_pid
776778

777779
self.logger.test_end(test.id,
778780
status,

0 commit comments

Comments
 (0)