# -*- python -*-
+import os
+from twisted.web import static
+static.File.contentTypes = static.loadMimeTypes(['/etc/mime.types', os.path.join(basedir, 'mime.types')])
+
from buildbot.changes.pb import PBChangeSource
import webkit
reload(webkit)
c = BuildmasterConfig = {}
-c['bots'] = webkit.auth.getSlaveAuthenticationDetails()
-c['sources'] = [PBChangeSource(prefix="trunk")]
+c['slaves'] = webkit.auth.getSlaveAuthenticationDetails()
+c['change_source'] = [PBChangeSource(prefix="trunk")]
c['builders'] = webkit.builders.getBuilders()
c['schedulers'] = webkit.schedulers.getSchedulers(c['builders'])
c['status'] = webkit.status.getStatusListeners()
c['slavePortnum'] = 9989
c['projectName'] = "WebKit"
-c['projectURL'] = "http://www.webkit.org/"
+c['projectURL'] = "http://webkit.org/"
c['buildbotURL'] = "http://build.webkit.org/"
+from buildbot.buildslave import BuildSlave
def getSlaveAuthenticationDetails():
+ def createBuildSlave((name, password)):
+ return BuildSlave(name, password, max_builds=1)
+ return map(createBuildSlave, _getSlaveAuthenticationDetails())
+
+def _getSlaveAuthenticationDetails():
return [("slave-name", "password")]
-from buildbot.process import step
+from buildbot.steps import shell, source
import os
-def buildStepWithDefaultTimeout(klass, default_timeout=45*60):
+def buildStepWithDefaultTimeout(klass, default_timeout=75*60):
class Step(klass):
timeout = default_timeout
def __init__(self, *args, **kwargs):
return Step
-Test = buildStepWithDefaultTimeout(step.Test)
-Compile = buildStepWithDefaultTimeout(step.Compile)
-ShellCommand = buildStepWithDefaultTimeout(step.ShellCommand)
-SVN = buildStepWithDefaultTimeout(step.SVN)
+Test = buildStepWithDefaultTimeout(shell.Test)
+Compile = buildStepWithDefaultTimeout(shell.Compile)
+ShellCommand = buildStepWithDefaultTimeout(shell.ShellCommand)
+SVN = buildStepWithDefaultTimeout(source.SVN)
class UploadCommand:
- def __init__(self, *args, **kwargs):
- self.__build = kwargs['build'].getStatus()
+ def initializeForUpload(self):
try:
try:
umask = os.umask(0)
os.umask(umask)
def getDestinationPath(self):
- return "/home/buildresults/results/%s/%s/" % (self.getBuild().getBuilder().getName(), self.getBuild().getNumber())
+ return "/home/buildresults%s" % (self.getURLPath(), )
def getRemotePath(self):
return "buildresults@build.webkit.org:%s" % (self.getDestinationPath(), )
def getURLPath(self):
- return '/results/%s/%s/' % (self.getBuild().getBuilder().getName(), self.getBuild().getNumber(), )
+ return '/results/%s/%s/' % (self.getBuild().builder.name, self.getBuild().getProperty("buildnumber"), )
def getBuild(self):
- return self.__build
+ return self.build
def getText(self, cmd, results):
# Slaves 4 and 5 are newer G5 PowerMacs with ATI graphics cards that lead to kernel panics during pixel tests
nonATIPowerPCBuilders = ['apple-slave-%d' % i for i in (3, 4)]
-ATIPowerPCBuilders = ['apple-slave-%d' % i for i in (5, 6)]
+ATIPowerPCBuilders = ['apple-slave-%d' % i for i in (1, 5, 6)]
allPowerPCBuilders = nonATIPowerPCBuilders + ATIPowerPCBuilders
+allIntelBuilders = ['bdash-slave-1', 'bdash-slave-2']
_builders = [('post-commit-powerpc-mac-os-x', StandardBuildFactory, allPowerPCBuilders),
- ('post-commit-leaks-powerpc-mac-os-x', LeakBuildFactory, ATIPowerPCBuilders),
- ('page-layout-test-mac-os-x', PageLoadTestBuildFactory, ['apple-slave-1']),
- ('post-commit-pixel-powerpc-mac-os-x', PixelTestBuildFactory, nonATIPowerPCBuilders),
+ ('post-commit-intel-mac-os-x', StandardBuildFactory, allIntelBuilders),
+ ('post-commit-leaks-powerpc-mac-os-x', LeakBuildFactory, allPowerPCBuilders),
+ ('post-commit-leaks-intel-mac-os-x', LeakBuildFactory, allIntelBuilders),
+# ('page-layout-test-mac-os-x', PageLoadTestBuildFactory, ['apple-slave-1']),
+# ('post-commit-pixel-powerpc-mac-os-x', PixelTestBuildFactory, nonATIPowerPCBuilders),
('post-commit-win32', Win32BuildFactory, ['apple-slave-2']),
+ ('post-commit-linux-qt', StandardBuildFactory, ['webtroll-slave-1']),
+ ('post-commit-linux-gtk', GtkBuildFactory, ['zecke-slave-1']),
('periodic-powerpc-mac-os-x-no-svg', NoSVGBuildFactory, allPowerPCBuilders),
- ('post-commit-linux-qt', StandardBuildFactory, ['wildfox-slave-1']),
+ ('periodic-intel-mac-os-x-coverage', CoverageDataBuildFactory, allIntelBuilders),
]
def getBuilders():
result = []
- oneBuildPerSlave = locks.SlaveLock('one-build-per-slave')
for name, factory, slaves in _builders:
result.append({'name': name,
'slavenames': slaves,
'builddir': name,
- 'locks': [oneBuildPerSlave],
'factory': factory()})
return result
BuildFactory.__init__(self)
self.steps.append(s(SetConfiguration, configuration="release"))
self.steps.append(s(self.getCompileStep(), configuration="release"))
- self.steps.append(s(JavaScriptCoreTest))
+ self.steps.append(s(self.getJavaScriptCoreTestStep()))
self.steps.append(s(LayoutTest))
self.steps.append(s(UploadLayoutResults))
# self.steps.append(s(UploadDiskImage))
def getCompileStep(self):
return CompileWebKit
+ def getJavaScriptCoreTestStep(self):
+ return JavaScriptCoreTest
+
class NoSVGBuildFactory(StandardBuildFactory):
def getCompileStep(self):
self.steps.append(s(CompileWebKit, configuration="release"))
self.steps.append(s(PageLoadTest))
-class Win32BuildFactory(BuildFactory):
+Win32BuildFactory = StandardBuildFactory
+
+class GtkBuildFactory(StandardBuildFactory):
+ def getCompileStep(self):
+ return CompileWebKitGtk
+
+ def getJavaScriptCoreTestStep(self):
+ return JavaScriptCoreTestGtk
+
+class CoverageDataBuildFactory(BuildFactory):
def __init__(self):
BuildFactory.__init__(self)
- self.steps.append(s(InstallWin32Dependencies))
- self.steps.append(s(CompileWebKit, configuration="release"))
- self.steps.append(s(JavaScriptCoreTest))
- self.steps.append(s(LayoutTest))
+ self.steps.append(s(GenerateCoverageData))
+ self.steps.append(s(UploadCoverageData))
from buildbot.scheduler import Scheduler, Periodic
def getSchedulers(builders):
- post_commit_builders = [b['name'] for b in builders if b['name'].startswith('post-commit-')] + ['page-layout-test-mac-os-x']
+ builder_names = map(lambda builder: builder['name'], builders)
+ post_commit_builders = [name for name in builder_names if name.startswith('post-commit-')] + ['page-layout-test-mac-os-x']
+ post_commit_builders = [name for name in post_commit_builders if name in builder_names]
post_commit_builders.sort()
periodic_builders = [b['name'] for b in builders if b['name'].startswith('periodic-')]
-from buildbot.status import html, mail, words, client
-from twisted.web.rewrite import RewriterResource
+from buildbot.status import html, mail, words
-class MyWaterfall(html.Waterfall):
- def setup(self):
- html.Waterfall.setup(self)
- rootResource = self.site.resource
- def rewriteXSL(request):
- if request.postpath and (request.postpath[-1].endswith('.xsl') or
- (request.postpath[0] == 'results' and (request.postpath[-1].endswith('.css') or
- request.postpath[-1].endswith('.js'))
- )):
- request.postpath = ['results', request.postpath[-1]]
- request.path = '/' + '/'.join(request.prepath + request.postpath)
- self.site.resource = RewriterResource(rootResource, rewriteXSL)
-
-waterfall = MyWaterfall(http_port=8010, css="buildbot.css", results_directory="/home/buildresults/results/", allowForce=False)
+web = html.WebStatus(http_port=8010)
allBuildsEmail = mail.MailNotifier(fromaddr="buildbot@webkit.org",
extraRecipients=["mark+webkit-builds@bdash.net.nz"],
sendToInterestedUsers=False)
breakageEmail = mail.MailNotifier(fromaddr="buildbot@webkit.org",
- extraRecipients=["mark+webkit-builds@bdash.net.nz"],
lookup=mail.Domain("webkit.org"),
- mode="breakage")
+ mode="failing")
IRC = words.IRC(host="irc.freenode.net",
nick="webkit-build",
channels=["#webkit-build"],
- announceAllBuilds=True)
+# announceAllBuilds=True
+ )
def getStatusListeners():
- return [waterfall, allBuildsEmail, breakageEmail, IRC]
+ return [web, allBuildsEmail, breakageEmail, IRC]
Test.commandComplete(self, cmd)
logText = cmd.logs['stdio'].getText()
- incorrectLayoutLines = [line for line in logText.splitlines() if line.find('had incorrect layout') >= 0]
+ incorrectLayoutLines = [line for line in logText.splitlines() if line.find('had incorrect layout') >= 0 or (line.find('test case') >= 0 and line.find(' crashed') >= 0)]
if incorrectLayoutLines:
- self.incorrectLayoutLine = incorrectLayoutLines[0]
+ self.incorrectLayoutLines = incorrectLayoutLines
else:
- self.incorrectLayoutLine = None
+ self.incorrectLayoutLines = None
def getText(self, cmd, results):
return self.getText2(cmd, results)
def getText2(self, cmd, results):
- if results != SUCCESS and self.incorrectLayoutLine:
- return [self.incorrectLayoutLine]
+ if results != SUCCESS and self.incorrectLayoutLines:
+ return self.incorrectLayoutLines
return [self.name]
Test.commandComplete(self, cmd)
logText = cmd.logs['stdio'].getText()
- self.totalLeakLines = [line for line in logText.splitlines() if line.find('total leaks found!') >= 0]
- self.totalLeakLines += [line for line in logText.splitlines() if line.find('LEAK: ') >= 0]
+ lines = logText.splitlines()
+ self.totalLeakLines = [line for line in lines if line.find('total leaks found!') >= 0]
+ self.totalLeakLines += [line for line in lines if line.find('LEAK: ') >= 0]
self.totalLeakLines = [' '.join(x.split()[1:]) for x in self.totalLeakLines]
+ self.totalLeakLines += [line for line in lines if line.find('test case') >= 0 and line.find('crashed') >= 0]
+
def evaluateCommand(self, cmd):
if cmd.rc != 0:
return [self.name]
-class PageLoadTest(UploadCommand, Test):
- name = "page-load-test"
- description = ["page-load-tests running"]
- descriptionDone = ["page-load-tests"]
- command = ["./WebKitTools/BuildSlaveSupport/run-performance-tests"]
-
- def __init__(self, *args, **kwargs):
- UploadCommand.__init__(self, *args, **kwargs)
- self.command = self.command + ['--upload-results', self.getRemotePath()]
- Test.__init__(self, *args, **kwargs)
-
- def getURLPath(self):
- return UploadCommand.getURLPath(self) + 'PerformanceReportSummary.xml'
-
-
class UploadLayoutResults(UploadCommand, ShellCommand):
name = "upload-results"
description = ["uploading results"]
descriptionDone = ["uploaded-results"]
+ command = "echo Disabled for now"
def __init__(self, *args, **kwargs):
- UploadCommand.__init__(self, *args, **kwargs)
-
+ ShellCommand.__init__(self, *args, **kwargs)
+
+ def setBuild(self, build):
+ ShellCommand.setBuild(self, build)
+ self.initializeForUpload()
+
self.command = '''\
if [[ -d layout-test-results ]]; then \
find layout-test-results -type d -print0 | xargs -0 chmod ug+rx; \
rsync -rlvzP --rsync-path="/home/buildresults/bin/rsync" $CRASH_LOG %s && rm -rf $CRASH_LOG; \
fi;''' % (self.getRemotePath(), self.getRemotePath())
- ShellCommand.__init__(self, *args, **kwargs)
+ self.addFactoryArguments(command=self.command)
class CompileWebKit(Compile):
command = ["./WebKitTools/Scripts/build-webkit", "--no-color"]
+ env = {'WEBKITSUPPORTLIBRARIESZIPDIR': 'C:\\cygwin\\home\\buildbot'}
def __init__(self, *args, **kwargs):
configuration = kwargs.pop('configuration')
class CompileWebKitNoSVG(CompileWebKit):
command = 'rm -rf WebKitBuild && ./WebKitTools/Scripts/build-webkit --no-svg --no-color'
+class CompileWebKitGtk(CompileWebKit):
+ command = CompileWebKit.command + ['--gtk']
+
+class JavaScriptCoreTestGtk(JavaScriptCoreTest):
+ command = JavaScriptCoreTest.command + ['--gtk']
+
class InstallWin32Dependencies(ShellCommand):
description = ["installing Windows dependencies"]
descriptionDone = ["installed Windows dependencies"]
- command = ["WebKitTools/Scripts/install-win-extras"]
+ command = ["WebKitTools/Scripts/update-webkit-auxiliary-libs"]
+
+
+# class UploadDiskImage(UploadCommand, ShellCommand):
+# description = ["uploading disk image"]
+# descriptionDone = ["uploaded disk image"]
+# name = "upload-disk-image"
+
+# def __init__(self, *args, **kwargs):
+# UploadCommand.__init__(self, *args, **kwargs)
+# self.command = 'umask 002 && ./WebKitTools/BuildSlaveSupport/build-launcher-app && ./WebKitTools/BuildSlaveSupport/build-launcher-dmg --upload-to-host %s' % (self.getRemotePath(), )
+# ShellCommand.__init__(self, *args, **kwargs)
+
+class GenerateCoverageData(Compile):
+ command = ["./WebKitTools/Scripts/generate-coverage-data"]
+ description = ["generating coverage data"]
+ descriptionDone = ["generated coverage data"]
-class UploadDiskImage(UploadCommand, ShellCommand):
- description = ["uploading disk image"]
- descriptionDone = ["uploaded disk image"]
- name = "upload-disk-image"
+class UploadCoverageData(UploadCommand, ShellCommand):
+ name = "upload-coverage-data"
+ description = ["uploading coverage data"]
+ descriptionDone = ["uploaded-coverage-data"]
+ command = "echo Disabled for now"
def __init__(self, *args, **kwargs):
- UploadCommand.__init__(self, *args, **kwargs)
- self.command = 'umask 002 && ./WebKitTools/BuildSlaveSupport/build-launcher-app && ./WebKitTools/BuildSlaveSupport/build-launcher-dmg --upload-to-host %s' % (self.getRemotePath(), )
ShellCommand.__init__(self, *args, **kwargs)
+
+ def setBuild(self, build):
+ ShellCommand.setBuild(self, build)
+ self.initializeForUpload()
+
+ self.command = '''\
+ if [[ -d WebKitBuild/Coverage/html ]]; then \
+ find WebKitBuild/Coverage/html -type d -print0 | xargs -0 chmod ug+rx; \
+ find WebKitBuild/Coverage/html -type f -print0 | xargs -0 chmod ug+r; \
+ rsync -rlvzP --rsync-path="/home/buildresults/bin/rsync" WebKitBuild/Coverage/html/ %s && rm -rf WebKitBuild/Coverage/html; \
+ fi;''' % (self.getRemotePath(), )
+
+ self.addFactoryArguments(command=self.command)
+
+ def getURLPath(self):
+ return "/results/code-coverage/"
+2007-10-02 Mark Rowe <mrowe@apple.com>
+
+ Rubber-stamped by Maciej.
+
+ Configuration changes from build.webkit.org. The major change is refactoring to work
+ with Buildbot 0.7.6, but it does include other smaller changes that have been made in the
+ last few weeks.
+
+ * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/auth.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/basesteps.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/builders.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/factories.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/schedulers.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/status.py:
+ * BuildSlaveSupport/build.webkit.org-config/webkit/steps.py:
+
2007-10-02 Lars Knoll <lars@trolltech.com>
Reviewed by Maciej.