Skip to content
Closed
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
14 changes: 10 additions & 4 deletions .github/scripts/check_log_warnings_remarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def call_API(self, endpoint):

api_call = APICall(endpoint)
response = requests.get(api_call.url, headers=api_call.header)
if response.status_code != 200:
logging.warning(response)
print(response)
sys.exit(1)
response = json.loads(response.text)

return response
Expand Down Expand Up @@ -96,15 +100,15 @@ def _get_pr_data(self, commit):
def compare_results(self, pr_log, base_log):
"""Compare warnings/remarks for PR head and base commits to determine whether warnings/remarks have increased."""

increases = {'warnings': [], 'remarks': []}
increases = {'warnings': {}, 'remarks': {}}

for test in pr_log:
# Check warnings
if pr_log[test][0] > base_log[test][0]:
increases['warnings'].append(test)
increases['warnings'].update({test: pr_log[test][0] - base_log[test][0]})
# Check remarks
if pr_log[test][1] > base_log[test][1]:
increases['remarks'].append(test)
increases['remarks'].update({test: pr_log[test][1] - base_log[test][1]})

return increases

Expand All @@ -118,7 +122,9 @@ def print_html_results(dict):
for category in results.keys():
if results[category]:
mdFile.write(f"\n<h3>{machine.upper()}</h3>\n")
unordered_list = [f"**{category.title()}:**", dict[machine][category]]
unordered_list = [f"**{category.title()}:**", []]
for test, value in dict[machine][category].items():
unordered_list[1].append(f"{test}: {value}")
mdFile.new_list(unordered_list, marked_with='*')
return mdFile.get_md_text()

Expand Down
2 changes: 1 addition & 1 deletion tests/logs/RegressionTests_hera.log
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ PASS -- TEST 'cpld_debug_sfs_intel' [15:15, 11:37](2238 MB)
PASS -- COMPILE 's2swa_32bit_pdlib_debug_intel' [06:12, 04:08] ( 339 warnings 2775 remarks )
PASS -- TEST 'cpld_debug_gfsv17_intel' [23:46, 21:55](1924 MB)

PASS -- COMPILE 's2swa_intel' [20:12, 18:44] ( 1 warnings 1048 remarks )
PASS -- COMPILE 's2swa_intel' [20:12, 18:44] ( 2 warnings 1048 remarks )
PASS -- TEST 'cpld_control_p8_intel' [14:05, 12:01](2276 MB)
PASS -- TEST 'cpld_control_p8.v2.sfc_intel' [14:07, 11:34](2283 MB)
PASS -- TEST 'cpld_restart_p8_intel' [08:04, 06:00](1858 MB)
Expand Down
Loading