bug 466998: ReleaseUpdatesFactory 'cvs diff' step (validly) returns 1, turns step red. r=ccooper, patch=me
git-svn-id: svn://10.0.0.236/trunk@255254 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1158,9 +1158,10 @@ class ReleaseUpdatesFactory(ReleaseFactory):
|
||||
description=['bump', patcherConfig],
|
||||
haltOnFailure=True
|
||||
)
|
||||
self.addStep(ShellCommand,
|
||||
self.addStep(TinderboxShellCommand,
|
||||
command=['cvs', 'diff', '-u', patcherConfigFile],
|
||||
description=['diff', patcherConfig]
|
||||
description=['diff', patcherConfig],
|
||||
ignoreCodes=[1]
|
||||
)
|
||||
if commitPatcherConfig:
|
||||
self.addStep(ShellCommand,
|
||||
|
||||
@@ -50,12 +50,26 @@ class TinderboxShellCommand(ShellCommand):
|
||||
haltOnFailure = False
|
||||
|
||||
"""This step is really just a 'do not care' buildstep for executing a
|
||||
slave command and ignoring the results.
|
||||
Always returns SUCCESS
|
||||
slave command and ignoring the results. If ignoreCodes is passed,
|
||||
only exit codes listed in it will be ignored. If ignoreCodes is not
|
||||
passed, all exit codes will be ignored.
|
||||
"""
|
||||
def __init__(self, ignoreCodes=None, **kwargs):
|
||||
ShellCommand.__init__(self, **kwargs)
|
||||
self.ignoreCodes = ignoreCodes
|
||||
self.addFactoryArguments(ignoreCodes=ignoreCodes)
|
||||
|
||||
def evaluateCommand(self, cmd):
|
||||
return SUCCESS
|
||||
# Ignore all return codes
|
||||
if not self.ignoreCodes:
|
||||
return SUCCESS
|
||||
else:
|
||||
# Ignore any of the return codes we're told to
|
||||
if cmd.rc in self.ignoreCodes:
|
||||
return SUCCESS
|
||||
# If the return code is something else, fail
|
||||
else:
|
||||
return FAILURE
|
||||
|
||||
class GetHgRevision(ShellCommand):
|
||||
"""Retrieves the revision from a Mercurial repository. Builds based on
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
from buildbot.status.builder import FAILURE, SUCCESS, WARNINGS
|
||||
from buildbot.steps.shell import ShellCommand
|
||||
|
||||
import buildbotcustom.steps.misc
|
||||
reload(buildbotcustom.steps.misc)
|
||||
|
||||
from buildbotcustom.steps.misc import TinderboxShellCommand
|
||||
|
||||
class UpdateVerify(ShellCommand):
|
||||
def evaluateCommand(self, cmd):
|
||||
for line in cmd.logs['stdio'].getText().split("\n"):
|
||||
@@ -9,7 +14,7 @@ class UpdateVerify(ShellCommand):
|
||||
|
||||
return SUCCESS
|
||||
|
||||
class L10nVerifyMetaDiff(ShellCommand):
|
||||
class L10nVerifyMetaDiff(TinderboxShellCommand):
|
||||
"""Run the l10n verification script.
|
||||
"""
|
||||
name='l10n metadiff'
|
||||
@@ -28,17 +33,16 @@ class L10nVerifyMetaDiff(ShellCommand):
|
||||
self.command=['diff', '-r',
|
||||
'%s/diffs' % currentProduct,
|
||||
'%s/diffs' % previousProduct]
|
||||
ShellCommand.__init__(self, **kwargs)
|
||||
TinderboxShellCommand.__init__(self, ignoreCodes=[0,1], **kwargs)
|
||||
|
||||
def evaluateCommand(self, cmd):
|
||||
superResult = ShellCommand.evaluateCommand(self, cmd)
|
||||
fileWarnings = self.getProperty('fileWarnings')
|
||||
if fileWarnings and len(fileWarnings) > 0:
|
||||
return WARNINGS
|
||||
'''We ignore failures here on purpose, since diff will
|
||||
return 1(FAILURE) if it actually finds anything to output.
|
||||
'''
|
||||
return SUCCESS
|
||||
return TinderboxShellCommand.evaluateCommand(self, cmd)
|
||||
|
||||
def createSummary(self, log):
|
||||
fileWarnings = []
|
||||
|
||||
Reference in New Issue
Block a user