ci/lava: Don't print LAVA debug messages

Remove debug messages from the output in order to unclutter the log a
little more for the developers.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16323>
This commit is contained in:
Guilherme Gallo
2022-06-30 18:41:14 -03:00
committed by Marge Bot
parent 466917ea4c
commit 29af421272
2 changed files with 1 additions and 57 deletions

View File

@@ -329,36 +329,15 @@ def fix_lava_gitlab_section_log(line):
line["msg"] = f"\x1b[0K{marker}:{timestamp}:{id_collapsible}\r\x1b[0K{header}"
def filter_debug_messages(line: dict[str, str]) -> bool:
"""Filter some LAVA debug messages that does not add much information to the
developer and may clutter the trace log."""
if line["lvl"] != "debug":
return False
# line["msg"] can be a list[str] when there is a kernel dump
if not isinstance(line["msg"], str):
return False
if re.match(
# Sometimes LAVA dumps this messages lots of times when the LAVA job is
# reaching the end.
r"^Listened to connection for namespace",
line["msg"],
):
return True
return False
def parse_lava_line(line) -> Optional[str]:
prefix = ""
suffix = ""
if line["lvl"] in ["results", "feedback"]:
if line["lvl"] in ["results", "feedback", "debug"]:
return
elif line["lvl"] in ["warning", "error"]:
prefix = CONSOLE_LOG["COLOR_RED"]
suffix = CONSOLE_LOG["RESET"]
elif filter_debug_messages(line):
return
elif line["lvl"] == "input":
prefix = "$ "
suffix = ""