diff --git a/.github/scripts/check_log_warnings_remarks.py b/.github/scripts/check_log_warnings_remarks.py index e8a6379831..2571c72a8b 100644 --- a/.github/scripts/check_log_warnings_remarks.py +++ b/.github/scripts/check_log_warnings_remarks.py @@ -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 @@ -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 @@ -118,7 +122,9 @@ def print_html_results(dict): for category in results.keys(): if results[category]: mdFile.write(f"\n

{machine.upper()}

\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() diff --git a/tests/logs/RegressionTests_hera.log b/tests/logs/RegressionTests_hera.log index 6548d379cf..9b36a5fbcf 100644 --- a/tests/logs/RegressionTests_hera.log +++ b/tests/logs/RegressionTests_hera.log @@ -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)