Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(106)

Side by Side Diff: third_party/buildbot_7_12/buildbot/steps/package/rpm/rpmlint.py

Issue 12207158: Bye bye buildbot 0.7.12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Steve 'Ashcrow' Milner <smilner+buildbot@redhat.com>
2 #
3 # This software may be freely redistributed under the terms of the GNU
4 # general public license.
5 #
6 # You should have received a copy of the GNU General Public License
7 # along with this program; if not, write to the Free Software
8 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
9 """
10 Steps and objects related to rpmlint.
11 """
12
13 from buildbot.steps.shell import Test
14
15
16 class RpmLint(Test):
17 """
18 Rpmlint build step.
19 """
20
21 description = ["Checking for RPM/SPEC issues"]
22 descriptionDone = ["Finished checking RPM/SPEC issues"]
23
24 def __init__(self, fileloc="*rpm", **kwargs):
25 """
26 Create the Rpmlint object.
27
28 @type fileloc: str
29 @param fileloc: Location glob of the specs or rpms.
30 @type kwargs: dict
31 @param fileloc: all other keyword arguments.
32 """
33 Test.__init__(self, **kwargs)
34 self.command = ["/usr/bin/rpmlint", "-i"]
35 self.command.append(fileloc)
36
37 def createSummary(self, log):
38 """
39 Create nice summary logs.
40
41 @param log: log to create summary off of.
42 """
43 warnings = []
44 errors = []
45 for line in log.readlines():
46 if ' W: ' in line:
47 warnings.append(line)
48 elif ' E: ' in line:
49 errors.append(line)
50 self.addCompleteLog('Rpmlint Warnings', "".join(warnings))
51 self.addCompleteLog('Rpmlint Errors', "".join(errors))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698