bug 393338: talos tinderbox needs to munge build start times to match code tested. r=robcee, patch=me

This commit is contained in:
bhearsum%mozilla.com 2007-10-18 16:40:14 +00:00
Родитель f4e9989ea3
Коммит 7b0b5e88ff
3 изменённых файлов: 24 добавлений и 41 удалений

Просмотреть файл

@ -107,6 +107,7 @@ c['status'].append(TinderboxMailNotifier(
extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org",],
relayhost="smtp.mozilla.org",
builders=["WINNT 5.1 talos trunk"],
useChangeTime=True,
logCompression="bzip2"))
# this is the local TinderboxMailNotifier
@ -116,6 +117,7 @@ c['status'].append(TinderboxMailNotifier(
extraRecipients=["tinderbox-daemon@tinderbox.mozilla.org",],
relayhost="smtp.mozilla.org",
builders=["WINNT 5.1 talos branch"],
useChangeTime=True,
logCompression="bzip2"))
# this is the system installed TinderboxMailNotifier
@ -137,6 +139,7 @@ c['status'].append(tinderbox.TinderboxMailNotifier(
"MacOSX Darwin 8.8.1 talos qm-pmac02 branch",
"MacOSX Darwin 8.8.1 talos qm-pmac03 trunk",
"MacOSX Darwin 8.8.1 talos qm-pmac04 branch"],
useChangeTime=True,
logCompression="bzip2"))
@ -345,7 +348,6 @@ firefox_trunk_winxp_perf_steps.addStep(ShellCommand,
win32_trunk_mini_steps = factory.BuildFactory()
win32_trunk_mini_steps.addStep(MozillaChangePusher)
win32_trunk_mini_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -406,7 +408,6 @@ win32_trunk_mini_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['vc8perf'])
linux_trunk_steps = factory.BuildFactory()
linux_trunk_steps.addStep(MozillaChangePusher)
linux_trunk_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -463,7 +464,6 @@ linux_trunk_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['linux'])
linux_branch_steps = factory.BuildFactory()
linux_branch_steps.addStep(MozillaChangePusher)
linux_branch_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -518,7 +518,6 @@ linux_branch_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['linux'])
linux_trunk_js_steps = factory.BuildFactory()
linux_trunk_js_steps.addStep(MozillaChangePusher)
linux_trunk_js_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -575,7 +574,6 @@ linux_trunk_js_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['linux'])
linux_branch_js_steps = factory.BuildFactory()
linux_branch_js_steps.addStep(MozillaChangePusher)
linux_branch_js_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -630,7 +628,6 @@ linux_branch_js_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['linux'])
win32_branch_steps = factory.BuildFactory()
win32_branch_steps.addStep(MozillaChangePusher)
win32_branch_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -691,7 +688,6 @@ win32_branch_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['vc8perf'])
win32_trunk_steps = factory.BuildFactory()
win32_trunk_steps.addStep(MozillaChangePusher)
win32_trunk_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -753,7 +749,6 @@ win32_trunk_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['vc8perf'])
win32_branch_new_pageloader_steps = factory.BuildFactory()
win32_branch_new_pageloader_steps.addStep(MozillaChangePusher)
win32_branch_new_pageloader_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -810,7 +805,6 @@ win32_branch_new_pageloader_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['vc8perf'])
mac_trunk_steps = factory.BuildFactory()
mac_trunk_steps.addStep(MozillaChangePusher)
mac_trunk_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -869,7 +863,6 @@ mac_trunk_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['mac'])
mac_branch_steps = factory.BuildFactory()
mac_branch_steps.addStep(MozillaChangePusher)
mac_branch_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -928,7 +921,6 @@ mac_branch_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['mac'])
mac_trunk_pageloader_steps = factory.BuildFactory()
mac_trunk_pageloader_steps.addStep(MozillaChangePusher)
mac_trunk_pageloader_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",
@ -987,7 +979,6 @@ mac_trunk_pageloader_steps.addStep(MozillaRunPerfTests,
env=MozillaEnvironments['mac'])
mac_branch_pageloader_steps = factory.BuildFactory()
mac_branch_pageloader_steps.addStep(MozillaChangePusher)
mac_branch_pageloader_steps.addStep(ShellCommand,
workdir=".",
description="Cleanup",

Просмотреть файл

@ -464,29 +464,6 @@ class MozillaInstallDmg(ShellCommand):
return SUCCESS
from buildbot.process.buildstep import BuildStep
class MozillaChangePusher(BuildStep):
warnOnFailure = True
name = "resubmit extra changes"
def start(self):
changes = self.step_status.build.getChanges()
if len(changes) > 1:
builderName = self.step_status.build.builder.name
remainingChanges = changes[1:] # everything but the first
# get rid of the rest of the changes in the Build and BuildStatus
changes = changes[:1] # only the first one
self.step_status.build.changes = changes
bs = BuildSet([builderName], SourceStamp(changes=remainingChanges))
# submit the buildset back to the BuildMaster
self.build.builder.botmaster.parent.submitBuildSet(bs)
self.finished(SUCCESS)
return
self.finished(SKIPPED)
return SKIPPED
def main(argv=None):
if argv is None:
argv = sys.argv

Просмотреть файл

@ -38,12 +38,14 @@ class TinderboxMailNotifier(mail.MailNotifier):
compare_attrs = ["extraRecipients", "fromaddr", "categories", "builders",
"addLogs", "relayhost", "subject", "binaryURL", "tree",
"logCompression", "errorparser", "columnName"]
"logCompression", "errorparser", "columnName",
"useChangeTime"]
def __init__(self, fromaddr, tree, extraRecipients,
categories=None, builders=None, relayhost="localhost",
subject="buildbot %(result)s in %(builder)s", binaryURL="",
logCompression="", errorparser="unix", columnName=None):
logCompression="", errorparser="unix", columnName=None,
useChangeTime=False):
"""
@type fromaddr: string
@param fromaddr: the email address to be used in the 'From' header.
@ -100,6 +102,10 @@ class TinderboxMailNotifier(mail.MailNotifier):
about (not recommended). When columnName is a
WithProperties instance it will be interpolated
as such. See WithProperties for more detail.
@type useChangeTime: bool
@param useChangeTime: When True, the time of the first Change for a
build is used as the builddate. When False,
the current time is used as the builddate.
"""
mail.MailNotifier.__init__(self, fromaddr, categories=categories,
@ -111,6 +117,7 @@ class TinderboxMailNotifier(mail.MailNotifier):
self.tree = tree
self.binaryURL = binaryURL
self.logCompression = logCompression
self.useChangeTime = useChangeTime
assert columnName is None or type(columnName) is str \
or isinstance(columnName, WithProperties), \
"columnName must be None, a string, or a WithProperties instance"
@ -134,7 +141,15 @@ class TinderboxMailNotifier(mail.MailNotifier):
text += "%s tree: %s\n" % (t, self.tree)
# the start time
# getTimes() returns a fractioned time that tinderbox doesn't understand
text += "%s builddate: %s\n" % (t, int(build.getTimes()[0]))
builddate = int(build.getTimes()[0])
# attempt to pull a Change time from this Build's Changes.
# if that doesn't work, fall back on the current time
if self.useChangeTime:
try:
builddate = build.getChanges()[-1].when
except:
pass
text += "%s builddate: %s\n" % (t, builddate)
text += "%s status: " % t
if results == "building":
@ -154,13 +169,13 @@ class TinderboxMailNotifier(mail.MailNotifier):
if self.columnName is None:
# use the builder name
text = "%s build: %s\n" % (t, name)
text += "%s build: %s\n" % (t, name)
elif type(self.columnName) is str:
# use the exact string given
text = "%s build: %s\n" % (t, self.columnName)
text += "%s build: %s\n" % (t, self.columnName)
elif isinstance(self.columnName, WithProperties):
# interpolate the WithProperties instance, use that
text = "%s build: %s\n" % (t, self.columnName.render(build))
text += "%s build: %s\n" % (t, self.columnName.render(build))
else:
raise Exception("columnName is an unhandled value")
text += "%s errorparser: %s\n" % (t, self.errorparser)