diff options
author | Magnus Granberg <zorry@gentoo.org> | 2024-03-16 11:09:12 +0100 |
---|---|---|
committer | Magnus Granberg <zorry@gentoo.org> | 2024-03-16 11:09:12 +0100 |
commit | ebac67eedbc65afaa3e3ae2abb22fba8a9277728 (patch) | |
tree | a6dcae259d74672ae84033c27d2f148cff486bf5 /buildbot_gentoo_ci | |
parent | Use faild_version_data when faild to get repo bug settings (diff) | |
download | tinderbox-cluster-ebac67eedbc65afaa3e3ae2abb22fba8a9277728.tar.gz tinderbox-cluster-ebac67eedbc65afaa3e3ae2abb22fba8a9277728.tar.bz2 tinderbox-cluster-ebac67eedbc65afaa3e3ae2abb22fba8a9277728.zip |
Add support for rules on title_line and fix regex on .patch
Signed-off-by: Magnus Granberg <zorry@gentoo.org>
Diffstat (limited to 'buildbot_gentoo_ci')
-rw-r--r-- | buildbot_gentoo_ci/steps/logs.py | 12 | ||||
-rw-r--r-- | buildbot_gentoo_ci/utils/regex.py | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/buildbot_gentoo_ci/steps/logs.py b/buildbot_gentoo_ci/steps/logs.py index a261dac..64bd3e7 100644 --- a/buildbot_gentoo_ci/steps/logs.py +++ b/buildbot_gentoo_ci/steps/logs.py @@ -216,6 +216,14 @@ class MakeIssue(BuildStep): word_list.append(word) return word_list + def title_line_rules(self, text_issue_list): + for text_issue in text_issue_list: + # patch fail + if re.search(' \* patch .* failed with /', text_issue): + return text_issue.replace('*', '').strip() + title_line = text_issue_list[0].replace('*', '').strip() + return title_line + def ClassifyIssue(self): # get the title for the issue text_issue_list = [] @@ -228,7 +236,9 @@ class MakeIssue(BuildStep): # add the issue error self.error_dict['cpv'] = self.getProperty('log_cpv') if text_issue_list != []: - title_line = text_issue_list[0].replace('*', '').strip() + print(f"text_issue_list: {text_issue_list}") + title_line = self.title_line_rules(text_issue_list) + print(f"title_line: {title_line}") self.error_dict['title_issue'] = title_line self.error_dict['title_issue_nice'] = self.getNiceErrorLine(title_line) self.error_dict['title_found'] = True diff --git a/buildbot_gentoo_ci/utils/regex.py b/buildbot_gentoo_ci/utils/regex.py index c8d19d0..f9ed284 100644 --- a/buildbot_gentoo_ci/utils/regex.py +++ b/buildbot_gentoo_ci/utils/regex.py @@ -25,5 +25,7 @@ def finishTitle(word): # ghyfv.v:78:9876: -> ghyfv.v if word.endswith(':') and any(i.isdigit() for i in word): word = word.split(':')[0] + if word.startswith('/') and word.endswith('.patch'): + word = word.split('/')[-1] print(f"Word: {word2} Finish Word: {word}") return word |