2007-10-02 Mark Rowe <mrowe@apple.com>
authorbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2007 09:13:00 +0000 (09:13 +0000)
committerbdash <bdash@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Oct 2007 09:13:00 +0000 (09:13 +0000)
        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:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25915 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg
WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/auth.py
WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/basesteps.py
WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/builders.py
WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/factories.py
WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/schedulers.py
WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/status.py
WebKitTools/BuildSlaveSupport/build.webkit.org-config/webkit/steps.py
WebKitTools/ChangeLog

index 92d3ca8796b46bc2d7de6254717eea2f9ce40009..ea7966a9031b72efb8591669ae23f264aa590e06 100644 (file)
@@ -1,18 +1,22 @@
 # -*- 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/"
index cbac0781da5285687228f32dd8e36ca17e3f6453..b182e16b6af2b96c5915c568262331061221f72c 100644 (file)
@@ -1,3 +1,9 @@
+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")]
index d8ca09e0fdb8465bc79bd258ffe7c2e8c37718cd..8bba8810d479fbfa4c621db175de6a9f6fb48640 100644 (file)
@@ -1,8 +1,8 @@
-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):
@@ -12,15 +12,14 @@ def buildStepWithDefaultTimeout(klass, default_timeout=45*60):
     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)
@@ -32,16 +31,16 @@ class UploadCommand:
             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):
index 2870445e8238ca51a4a4793293655c63c716333b..b4e087e046f1448cc9e43eb2cb94c4525fcc6a49 100644 (file)
@@ -8,25 +8,28 @@ from buildbot import locks
 # 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
index 05ec90c61e1d46c065b3ced4ce2717e51000d107..781375f8d953875e08ce468e7e05de521f04ff80 100644 (file)
@@ -13,7 +13,7 @@ class StandardBuildFactory(BuildFactory):
         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))
@@ -21,6 +21,9 @@ class StandardBuildFactory(BuildFactory):
     def getCompileStep(self):
         return CompileWebKit
 
+    def getJavaScriptCoreTestStep(self):
+        return JavaScriptCoreTest
+
 
 class NoSVGBuildFactory(StandardBuildFactory):
     def getCompileStep(self):
@@ -51,10 +54,17 @@ class PageLoadTestBuildFactory(BuildFactory):
         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))
index 9bdee4fe1fffe1653a41370c799ed0756e8c3a8b..11f9d418e7df6729019e6b13ba03969bf30484ce 100644 (file)
@@ -1,7 +1,9 @@
 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-')]
index a1e0a1698837c47d711bfcc153a36e3e050b7509..ad5519e310df1be573bbf3d3c1287421e8ce5a67 100644 (file)
@@ -1,33 +1,19 @@
-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]
index 734c4e112ddc79fb638d64fe6acb4ab2f7f9bd97..c1933a3c7b8eb2dc4b3015f99f8cca3c508eb25d 100644 (file)
@@ -29,18 +29,18 @@ class LayoutTest(Test):
         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]
 
@@ -97,9 +97,12 @@ class LeakTest(Test):
         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:
@@ -119,29 +122,19 @@ class LeakTest(Test):
         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; \
@@ -154,11 +147,12 @@ class UploadLayoutResults(UploadCommand, ShellCommand):
             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')
         
@@ -172,18 +166,55 @@ class CompileWebKit(Compile):
 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/"
index 673ad283e38f26155b703e509d41bb66b49dc897..c553f93f2b98b20cfee0c7092825b83ccdddef91 100644 (file)
@@ -1,3 +1,20 @@
+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.