Skip to content

Commit 7a79358

Browse files
committed
misc/fedora: add more details to print_summary()
1 parent b02eab0 commit 7a79358

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

misc/fedora/bugreporting.py

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -108,31 +108,43 @@ def find(self, srpmname):
108108
result.append(status)
109109
return result
110110

111-
def summary(self):
111+
def print_summary(self):
112+
global total
112113
num_bugs = 0
113114
fixmes = 0
114115
others = 0
116+
cplusplus = 0
117+
swig = 0
118+
cython = 0
115119
for status in self.statuses:
116120
if isinstance(status, BugReport):
117121
num_bugs += 1
118122
elif isinstance(status, Unreported):
119123
if 'FIXME' in status.notes or 'TODO' in status.notes:
120-
fixmes += 1
124+
if 'C++' in status.notes:
125+
cplusplus += 1
126+
elif 'SWIG' in status.notes:
127+
swig += 1
128+
elif 'Cython' in status.notes:
129+
cython += 1
130+
else:
131+
fixmes += 1
121132
else:
122133
others += 1
123134
num_src_rpms = len(glob.glob('SRPMS/*.src.rpm'))
124-
return num_bugs, fixmes, others, num_src_rpms
125-
126-
def print_summary(self):
127-
num_bugs, fixmes, others, num_src_rpms = self.summary()
135+
total = 0
128136
def print_amount(desc, count):
137+
global total
129138
print('* %i %s (%i%%)'
130139
% (count, desc, count * 100 / num_src_rpms))
140+
total += count
131141
print_amount('bugs filed for src.rpms, where the checker found genuine problems', num_bugs)
132142
print_amount('src.rpms not requiring a bug to be filed', others)
133-
print_amount('src.rpms requiring followup work', fixmes)
134-
print_amount('src.rpms not yet processed',
135-
num_src_rpms - (num_bugs + fixmes +others))
143+
print_amount('src.rpms waiting on fix for C++ support', cplusplus)
144+
print_amount('src.rpms waiting on better SWIG support', swig)
145+
print_amount('src.rpms waiting on better Cython support', cython)
146+
print_amount('src.rpms requiring other followup work', fixmes)
147+
print_amount('src.rpms not accounted for', num_src_rpms - total)
136148
print('out of %i total src.rpms (that link against libpython2.7)'
137149
% num_src_rpms)
138150

0 commit comments

Comments
 (0)