ci/lava: Filter out undesired messages

Some LAVA jobs emit lots of messages "Listened to connection for
namespace 'common' for up to 1s" in a row at the end of the logs, making
difficult to see the result of the test script.

This commit removes those lines until a proper solution is deployed on
the LAVA side.

Closes: #6116

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17151>
This commit is contained in:
Guilherme Gallo
2022-06-20 19:12:28 -03:00
committed by Marge Bot
parent 64d074879b
commit cee1c4fc7f
2 changed files with 56 additions and 1 deletions

View File

@@ -37,6 +37,7 @@ from lava.lava_job_submitter import (
DEVICE_HANGING_TIMEOUT_SEC,
NUMBER_OF_RETRIES_TIMEOUT_DETECTION,
LAVAJob,
filter_debug_messages,
fix_lava_color_log,
fix_lava_gitlab_section_log,
follow_job_execution,
@@ -420,7 +421,6 @@ GITLAB_SECTION_MANGLED_SCENARIOS = {
),
}
@pytest.mark.parametrize(
"message, fixed_message",
GITLAB_SECTION_MANGLED_SCENARIOS.values(),
@@ -430,3 +430,37 @@ def test_fix_lava_gitlab_section_log(message, fixed_message):
fix_lava_gitlab_section_log(message)
assert message["msg"] == fixed_message
LAVA_DEBUG_SPAM_MESSAGES = {
"Listened to connection in debug level": (
create_lava_yaml_msg(
msg="Listened to connection for namespace 'common' for up to 1s",
lvl="debug",
),
True,
),
"Listened to connection in debug level - v2": (
create_lava_yaml_msg(
msg="Listened to connection for namespace 'prepare' for up to 9s",
lvl="debug",
),
True,
),
"Listened to connection in target level": (
create_lava_yaml_msg(
msg="Listened to connection for namespace 'common' for up to 1s",
lvl="target",
),
False,
),
}
@pytest.mark.parametrize(
"message, expectation",
LAVA_DEBUG_SPAM_MESSAGES.values(),
ids=LAVA_DEBUG_SPAM_MESSAGES.keys(),
)
def test_filter_debug_messages(message, expectation):
assert filter_debug_messages(message) == expectation