Skip to content

fix for suite_report extract paths #75

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 7, 2025
Merged
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
38 changes: 25 additions & 13 deletions suite_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -1287,21 +1287,33 @@ def check_lfric_extract_list(self):
return_message = ["'''LFRic Testing Requirements'''"]
return_message.append("")

# Export the extract list from the lfric trunk
exported_extract_file = "~/tmp_extract.txt"
extract_list_path = self.export_file(
"fcm:lfric_apps.xm_tr",
"build/extract/extract.cfg",
exported_extract_file,
)
extract_list_dict = {}
extract_files = [
"build/extract/extract.cfg",
"interfaces/jules_interface/build/extract.cfg",
"interfaces/socrates_interface/build/extract.cfg",
]

if extract_list_path:
try:
extract_list_dict = self.parse_lfric_extract_list(extract_list_path)
except (EnvironmentError, TypeError, AttributeError):
# Potential error here changed type between python2 and 3
extract_list_path = None
for extract_file in extract_files:
# Export the extract list from the lfric trunk
exported_extract_file = "~/tmp_extract.txt"
extract_list_path = self.export_file(
"fcm:lfric_apps.xm_tr",
extract_file,
exported_extract_file,
)

if extract_list_path:
try:
temp_dict = self.parse_lfric_extract_list(extract_list_path)
for item in temp_dict:
if item in extract_list_dict:
extract_list_dict[item] += temp_dict[item]
else:
extract_list_dict[item] = temp_dict[item]
except (EnvironmentError, TypeError, AttributeError):
# Potential error here changed type between python2 and 3
extract_list_path = None

# If the path returned is None, the extract list failed, most likely as
# the user doesn't have lfric access. In this case return a warning.
Expand Down