Gentoo Archives: gentoo-commits

From: Magnus Granberg <zorry@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/tinderbox-cluster:master commit in: buildbot_gentoo_ci/steps/
Date: Wed, 06 Jul 2022 18:44:40
Message-Id: 1657133048.86dae64f04e20bf74405496289564cd993429c03.zorry@gentoo
1 commit: 86dae64f04e20bf74405496289564cd993429c03
2 Author: Magnus Granberg <zorry <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jul 6 18:44:08 2022 +0000
4 Commit: Magnus Granberg <zorry <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 6 18:44:08 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/tinderbox-cluster.git/commit/?id=86dae64f
7
8 Change title_issue and title_phase
9
10 Signed-off-by: Magnus Granberg <zorry <AT> gentoo.org>
11
12 buildbot_gentoo_ci/steps/bugs.py | 2 +-
13 buildbot_gentoo_ci/steps/logs.py | 29 +++--------------------------
14 2 files changed, 4 insertions(+), 27 deletions(-)
15
16 diff --git a/buildbot_gentoo_ci/steps/bugs.py b/buildbot_gentoo_ci/steps/bugs.py
17 index e43c926..27b1388 100644
18 --- a/buildbot_gentoo_ci/steps/bugs.py
19 +++ b/buildbot_gentoo_ci/steps/bugs.py
20 @@ -88,7 +88,7 @@ class GetBugs(BuildStep):
21 match = False
22 for bug in buglist:
23 yield log.addStdout('Bug: ' + str(bug['id']) + ' Summary: ' + bug['summary'] +'\n')
24 - if re.search(self.getProperty('error_dict')['title_phase'][:20], bug['summary']):
25 + if re.search(self.getProperty('error_dict')['title_issue'][:20], bug['summary']):
26 print('Bug found')
27 print(bug)
28 match = {}
29
30 diff --git a/buildbot_gentoo_ci/steps/logs.py b/buildbot_gentoo_ci/steps/logs.py
31 index 7a63658..e5e61a5 100644
32 --- a/buildbot_gentoo_ci/steps/logs.py
33 +++ b/buildbot_gentoo_ci/steps/logs.py
34 @@ -318,39 +318,16 @@ class MakeIssue(BuildStep):
35 text_phase_list = []
36 for k, v in sorted(self.summary_log_dict.items()):
37 # get the issue error
38 - if v['text'].startswith(' * ERROR:') and v['text'].endswith(' phase):'):
39 - issue_text = self.summary_log_dict[k + 1]['text']
40 - if issue_text.startswith(' * ninja -v -j'):
41 - issue_text = 'ninja failed'
42 - if issue_text.startswith(' * (no error'):
43 - issue_text = False
44 - if issue_text:
45 - text_issue_list.append(issue_text)
46 - # get the phase error
47 if v['type'] == self.error_dict['phase'] and v['status'] == 'error':
48 - text_phase_list.append(v['text'])
49 - # if not get the first issue
50 - if text_issue_list == []:
51 - for k, v in self.summary_log_dict.items():
52 - if v['type'] == 'issues':
53 - text_issue_list.append(v['text'])
54 - # if not get the first error
55 - if text_phase_list == []:
56 - for k, v in self.summary_log_dict.items():
57 - if v['status'] == 'error':
58 - text_phase_list.append(v['text'])
59 + text_issue_list.append(v['text'])
60 # add the issue error
61 if text_issue_list != []:
62 self.error_dict['title_issue'] = text_issue_list[0].replace('*', '').strip()
63 else:
64 self.error_dict['title_issue'] = 'title_issue : None'
65 - # add the error line
66 - if text_phase_list != []:
67 - self.error_dict['title_phase'] = text_phase_list[0].replace('*', '').strip()
68 - else:
69 - self.error_dict['title_phase'] = 'title_phase : None'
70 + self.error_dict['title_phase'] = 'failed in '+ self.error_dict['phase']
71 #set the error title
72 - self.error_dict['title'] = self.error_dict['title_issue'] + ' (' + self.error_dict['title_phase'] + ')'
73 + self.error_dict['title'] = self.error_dict['title_phase'] + ' - ' + self.error_dict['title_issue']
74
75 @defer.inlineCallbacks
76 def run(self):