Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .yamato/script/log_scripts/log_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from utils.utr_log import UTR_log
from utils.unity_log import Unity_log
from utils.shared_utils import *
from utils.constants import *

'''
This script runs for extended Yamato reporting. It
Expand Down Expand Up @@ -73,18 +74,18 @@ def recursively_match_patterns(logs, cmd, patterns, failure_string):
test_results_path = test_results_match[1] + test_results_match[2]
for redirect in pattern['redirect']:

if redirect == 'utr_log':
if redirect == UTR_LOG:
try:
df = UTR_log(test_results_path)
recursively_match_patterns(logs, cmd, df.get_patterns(), df.read_log())
except Exception as e:
print('! Failed to parse UTR TestResults.json: ', e)
elif redirect == 'unity_log':
print(f'! Failed to parse UTR TestResults.json: ', str(e))
elif redirect == UNITY_LOG:
try:
df = Unity_log(test_results_path)
recursively_match_patterns(logs, cmd, df.get_patterns(), df.read_log())
except Exception as e:
print('! Failed to parse UnityLog.txt', e)
print(f'! Failed to parse UnityLog.txt', str(e))

else:
print('! Invalid redirect: ', redirect)
Expand Down
1 change: 1 addition & 0 deletions .yamato/script/log_scripts/utils/utr_log.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import os
from .shared_utils import load_json, find_matching_patterns
from .shared_utils import *

class UTR_log():
''''Handles parsing UTR logs (TestResults.json) against known error patterns'''
Expand Down