forked from mirrors/gecko-dev
Bug 1850134 - Reftest crashes and other exits do not end up properly in errorsummary. r=aryx
Differential Revision: https://phabricator.services.mozilla.com/D186848
This commit is contained in:
parent
e662c43269
commit
1ab4c56a90
4 changed files with 16 additions and 6 deletions
|
|
@ -1008,12 +1008,8 @@ class RefTest(object):
|
|||
status = 1
|
||||
|
||||
if status and not crashed:
|
||||
msg = (
|
||||
"TEST-UNEXPECTED-FAIL | %s | application terminated with exit code %s"
|
||||
% (self.lastTestSeen, status)
|
||||
)
|
||||
# use process_output so message is logged verbatim
|
||||
self.log.process_output(None, msg)
|
||||
msg = "application terminated with exit code %s" % (status)
|
||||
self.log.shutdown_failure(group=self.lastTestSeen, message=msg)
|
||||
|
||||
runner.cleanup()
|
||||
self.cleanup(profile.profile)
|
||||
|
|
|
|||
|
|
@ -129,6 +129,12 @@ class ErrorSummaryFormatter(BaseFormatter):
|
|||
data = {"level": item["level"], "message": item["message"]}
|
||||
return self._output("log", data)
|
||||
|
||||
def shutdown_failure(self, item):
|
||||
data = {"status": "FAIL", "test": item["group"], "message": item["message"]}
|
||||
data["group"] = [g for g in self.groups if item["group"].endswith(g)][0]
|
||||
self.groups[data["group"]]["status"] = "FAIL"
|
||||
return self._output("log", data)
|
||||
|
||||
def crash(self, item):
|
||||
data = {
|
||||
"test": item.get("test"),
|
||||
|
|
|
|||
|
|
@ -100,6 +100,10 @@ class TbplFormatter(BaseFormatter):
|
|||
def process_exit(self, data):
|
||||
return "TEST-INFO | %s: %s\n" % (data["process"], strstatus(data["exitcode"]))
|
||||
|
||||
@output_subtests
|
||||
def shutdown_failure(self, data):
|
||||
return "TEST-UNEXPECTED-FAIL | %s | %s\n" % (data["group"], data["message"])
|
||||
|
||||
@output_subtests
|
||||
def crash(self, data):
|
||||
id = data["test"] if "test" in data else "pid: %s" % data["process"]
|
||||
|
|
|
|||
|
|
@ -551,6 +551,10 @@ class StructuredLogger(object):
|
|||
|
||||
self._log_data("crash", data)
|
||||
|
||||
@log_action(Unicode("group", default=None), Unicode("message", default=None))
|
||||
def shutdown_failure(self, data):
|
||||
self._log_data("shutdown_failure", data)
|
||||
|
||||
@log_action(
|
||||
Unicode("primary", default=None), List(Unicode, "secondary", default=None)
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue