Title: [92191] trunk/Tools
Revision
92191
Author
[email protected]
Date
2011-08-02 08:25:33 -0700 (Tue, 02 Aug 2011)

Log Message

CSS Regions build bot should archive and upload output files
https://bugs.webkit.org/show_bug.cgi?id=65200

Until now the buildbots would only upload the result archive if the 'trigger' parameters was specified. The
upload was needed, because the testbots needed to download and use the archive. For CSS Regions we don't have
a testbot yet, but we want to save the archive on the server for manual testing. Added new parameter
in config.json, called "upload" that when set to "true" will force the upload to the buildmaster server.

The "features" argument is now taken into account when determining the name of the archive on the server. That
was needed in order to avoid the CSS Regions Mac buildbot overwrite the SnowLeopard Mac build.

Patch by Alexandru Chiculita <[email protected]> on 2011-08-02
Reviewed by Adam Roben.

* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/master.cfg:

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/config.json (92190 => 92191)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/config.json	2011-08-02 15:18:31 UTC (rev 92190)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/config.json	2011-08-02 15:25:33 UTC (rev 92191)
@@ -259,6 +259,7 @@
                     },
                     { "name": "CSSRegions SnowLeopard Intel Release (Build)", "type": "Build", "builddir": "cssregions-snowleopard-intel-release",
                       "platform": "mac-snowleopard", "configuration": "release", "architectures": ["x86_64"], "features": ["css-regions", "css-exclusions"],
+                      "upload": true,
                       "slavenames": ["adobe-mac-slave1"]
                     }
                   ],

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg (92190 => 92191)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg	2011-08-02 15:18:31 UTC (rev 92190)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/master.cfg	2011-08-02 15:25:33 UTC (rev 92191)
@@ -131,13 +131,26 @@
 
 class UploadBuiltProduct(transfer.FileUpload):
     slavesrc = WithProperties("WebKitBuild/%(configuration)s.zip")
-    masterdest = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(got_revision)s.zip")
+    masterdest = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s%(extraFeatures)s/%(got_revision)s.zip",
+                                extraFeatures=lambda properties: UploadBuiltProduct.determineExtraFeatures(properties))
     haltOnFailure = True
 
     def __init__(self):
         transfer.FileUpload.__init__(self, self.slavesrc, self.masterdest, mode=0644)
 
+    @staticmethod
+    def determineExtraFeatures(properties):
+        if not properties.hasProperty("features"):
+            return ''
+        features = properties.getProperty("features")
+        if not len(features):
+            return ''
+        result = '-with-' + '-and-'.join(features)
+        # Just to make sure no feature will add invalid chars, we allow only letters here.
+        result = re.sub('[^a-zA-Z]', '-', result)
+        return result
 
+
 class DownloadBuiltProduct(transfer.FileDownload):
     slavedest = WithProperties("WebKitBuild/%(configuration)s.zip")
     mastersrc = WithProperties("archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(got_revision)s.zip")
@@ -591,7 +604,7 @@
 
 
 class Factory(factory.BuildFactory):
-    def __init__(self, platform, configuration, architectures, buildOnly, features=None):
+    def __init__(self, platform, configuration, architectures, buildOnly, features=None, **kwargs):
         factory.BuildFactory.__init__(self)
         self.addStep(ConfigureBuild, platform=platform, configuration=configuration, architecture=" ".join(architectures), buildOnly=buildOnly, features=features)
         self.addStep(CheckOutSource)
@@ -603,12 +616,13 @@
             self.addStep(InstallChromiumDependencies)
 
 class BuildFactory(Factory):
-    def __init__(self, platform, configuration, architectures, triggers=None, **kwargs):
+    def __init__(self, platform, configuration, architectures, triggers=None, upload=False, **kwargs):
         Factory.__init__(self, platform, configuration, architectures, True, **kwargs)
         self.addStep(CompileWebKit)
-        if triggers:
+        if triggers or upload:
             self.addStep(ArchiveBuiltProduct)
             self.addStep(UploadBuiltProduct)
+        if triggers:
             self.addStep(trigger.Trigger, schedulerNames=triggers)
 
 def unitTestsSupported(configuration, platform):
@@ -725,7 +739,8 @@
                 factoryArgs.append(value)
 
         factoryKwArgs = {
-            "features": builder.pop("features", [])
+            "features": builder.pop("features", []),
+            "upload": builder.pop("upload", False)
         }
 
         builder["factory"] = factory(*factoryArgs, **factoryKwArgs)

Modified: trunk/Tools/ChangeLog (92190 => 92191)


--- trunk/Tools/ChangeLog	2011-08-02 15:18:31 UTC (rev 92190)
+++ trunk/Tools/ChangeLog	2011-08-02 15:25:33 UTC (rev 92191)
@@ -1,3 +1,21 @@
+2011-08-02  Alexandru Chiculita  <[email protected]>
+
+        CSS Regions build bot should archive and upload output files
+        https://bugs.webkit.org/show_bug.cgi?id=65200
+
+        Until now the buildbots would only upload the result archive if the 'trigger' parameters was specified. The
+        upload was needed, because the testbots needed to download and use the archive. For CSS Regions we don't have
+        a testbot yet, but we want to save the archive on the server for manual testing. Added new parameter
+        in config.json, called "upload" that when set to "true" will force the upload to the buildmaster server.
+
+        The "features" argument is now taken into account when determining the name of the archive on the server. That
+        was needed in order to avoid the CSS Regions Mac buildbot overwrite the SnowLeopard Mac build.
+
+        Reviewed by Adam Roben.
+
+        * BuildSlaveSupport/build.webkit.org-config/config.json:
+        * BuildSlaveSupport/build.webkit.org-config/master.cfg:
+
 2011-08-02  Patrick Gansterer  <[email protected]>
 
         Fix _win32_check_running_pid on 64bit windows python
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to