Skip to content

Commit 57ded33

Browse files
Update const.py and log_validation_utils.py for improved configuration and log phrase checking
1 parent fb89f80 commit 57ded33

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tests/validation/Engine/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@
5151
MESH_AGENT_ERROR_KEYWORDS = ["[ERRO]"]
5252
RX_TX_APP_ERROR_KEYWORDS = ["[ERRO]"]
5353

54+
DEFAULT_REMOTE_PORT = 20000
5455
DEFAULT_MPG_URN = f"ipv4:224.0.0.1:{DEFAULT_REMOTE_PORT}"
5556
DEFAULT_REMOTE_IP_ADDR = "239.2.39.238"
56-
DEFAULT_REMOTE_PORT = 20000
5757
DEFAULT_PACING = "narrow"
5858
DEFAULT_PAYLOAD_TYPE_ST2110_20 = 112
5959
DEFAULT_PAYLOAD_TYPE_ST2110_30 = 111

tests/validation/common/log_validation_utils.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,14 @@ def check_phrases_anywhere(
242242
lines = content.split("\n")
243243

244244
for phrase in phrases:
245-
if phrase not in content:
245+
# Check if the phrase is contained in any line, not just the entire content
246+
phrase_found = False
247+
for line in lines:
248+
if phrase in line:
249+
phrase_found = True
250+
break
251+
252+
if not phrase_found:
246253
missing_phrases.append(phrase)
247254
# Find where the phrase should have appeared
248255
# Just give some context from the end of the log

0 commit comments

Comments
 (0)