From bbfb21bec6109f4c7b8b65443f33284bc7c5c6dc Mon Sep 17 00:00:00 2001 From: Thomas Roeblitz Date: Tue, 20 Feb 2024 07:06:37 +0100 Subject: [PATCH] add a bit log info + fixing obtaining target_arch --- tasks/build.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tasks/build.py b/tasks/build.py index ad90a314..8c1a8415 100644 --- a/tasks/build.py +++ b/tasks/build.py @@ -865,6 +865,8 @@ def request_bot_build_issue_comments(repo_name, pr_number): status_table (dict): dictionary with 'arch', 'date', 'status', 'url' and 'result' for all the finished builds; """ + fn = sys._getframe().f_code.co_name + status_table = {'arch': [], 'date': [], 'status': [], 'url': [], 'result': []} cfg = config.read_config() @@ -885,9 +887,12 @@ def request_bot_build_issue_comments(repo_name, pr_number): first_line = comment['body'].split('\n')[0] arch_map = get_architecture_targets(cfg) for arch in arch_map.keys(): - target_arch = '/'.join(arch.split('/')[-1]) + # drop the first element in arch (which names the OS type) and join the remaining items with '-' + target_arch = '-'.join(arch.split('/')[1:]) if target_arch in first_line: status_table['arch'].append(target_arch) + else: + log(f"{fn}(): target_arch '{target_arch}' not found in first line '{first_line}'") # get date, status, url and result from the markdown table comment_table = comment['body'][comment['body'].find('|'):comment['body'].rfind('|')+1]