Changeset 72111 in webkit


Ignore:
Timestamp:
Nov 16, 2010 9:41:25 AM (13 years ago)
Author:
Adam Roben
Message:

Only trigger Windows builds when files that we actually use on Windows are changed

A new Scheduler subclass, PlatformSpecificScheduler, has been added.
It uses the new webkitpy.common.config.build module to determine
whether a particular change should trigger a build on a particular
platform. The Windows builders have been switched to use a
PlatformSpecificScheduler.

The logic to determine whether or not a particular change should
trigger a build on a given platform has only been implemented/tested
for Windows. I tried to make it easy to add more platforms in the
future, but I don't have enough familiarity with all platforms to be
able to implement it for them.

Fixes <http://webkit.org/b/49407> Windows builders kick off builds for
lots irrelevant changes (e.g., rebaselining Chromium test results)

Reviewed by Eric Seidel.

  • BuildSlaveSupport/build.webkit.org-config/config.json: Use a

PlatformSpecificScheduler for the Windows builders.

  • BuildSlaveSupport/build.webkit.org-config/master.cfg:

(PlatformSpecificScheduler.init): Added. Stores our platform, sets
up a ChangeFilter that filters to our branch and will call through to
our filter method, and calls up to our base class.
(PlatformSpecificScheduler.filter): Calls through to
build.should_build to find out whether we should trigger a build for
this change.

  • Scripts/webkitpy/common/net/build.py: Added.

(_should_file_trigger_build): Uses a set of directories and regexp
patterns to determine whether the given file should trigger a build on
the given platform. As mentioned earlier, this has only been
implemented for Windows, though I did try to make some guesses about
other platforms.
(should_build): Returns true if any of the files should trigger a
build on the given platform.

  • Scripts/webkitpy/common/net/build_unittest.py: Added.

(ShouldBuildTest.test_should_build): Does some basic testing to make
sure we're triggering builds for the right files. It only tests
Windows for now, though I tried to make some guesses about other
platforms.

Location:
trunk/WebKitTools
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/BuildSlaveSupport/build.webkit.org-config/config.json

    r71023 r72111  
    215215                      "builderNames": ["Leopard Intel Release (Build)", "Leopard Intel Debug (Build)",
    216216                                       "SnowLeopard Intel Release (Build)", "SnowLeopard Intel Leaks",
    217                                        "Windows Release (Build)", "Windows Debug (Build)",
    218217                                       "GTK Linux 32-bit Release", "GTK Linux 32-bit Debug", "GTK Linux 64-bit Debug", "GTK Linux 64-bit Release",
    219218                                       "Qt Linux Release", "Qt Linux Release minimal", "Qt Linux ARMv5 Release", "Qt Linux ARMv7 Release",
     
    223222                                       "WinCairo Debug (Build)", "EFL Linux Release (Build)"]
    224223                    },
     224                    { "type": "PlatformSpecificScheduler", "platform": "win", "branch": "trunk", "treeStableTimer": 45.0,
     225                      "builderNames": ["Windows Release (Build)", "Windows Debug (Build)"]
     226                    },
    225227                    { "type": "Triggerable", "name": "leopard-intel-release-tests",
    226228                      "builderNames": ["Leopard Intel Release (Tests)"]
  • trunk/WebKitTools/BuildSlaveSupport/build.webkit.org-config/master.cfg

    r71509 r72111  
    1818import simplejson
    1919
     20from webkitpy.common.config import build as wkbuild
    2021from webkitpy.common.net.buildbot import BuildBot as wkbuildbot
    2122
     
    479480    TestClass = RunWebKit2Tests
    480481
     482class PlatformSpecificScheduler(AnyBranchScheduler):
     483    def __init__(self, platform, branch, **kwargs):
     484        self.platform = platform
     485        filter = ChangeFilter(branch=[branch, None], filter_fn=self.filter)
     486        AnyBranchScheduler.__init__(self, name=platform, change_filter=filter, **kwargs)
     487
     488    def filter(self, change):
     489        return wkbuild.should_build(self.platform, change.files)
     490
    481491trunk_filter = ChangeFilter(branch=["trunk", None])
    482492
  • trunk/WebKitTools/ChangeLog

    r72101 r72111  
     12010-11-16  Adam Roben  <aroben@apple.com>
     2
     3        Only trigger Windows builds when files that we actually use on Windows
     4        are changed
     5
     6        A new Scheduler subclass, PlatformSpecificScheduler, has been added.
     7        It uses the new webkitpy.common.config.build module to determine
     8        whether a particular change should trigger a build on a particular
     9        platform. The Windows builders have been switched to use a
     10        PlatformSpecificScheduler.
     11
     12        The logic to determine whether or not a particular change should
     13        trigger a build on a given platform has only been implemented/tested
     14        for Windows. I tried to make it easy to add more platforms in the
     15        future, but I don't have enough familiarity with all platforms to be
     16        able to implement it for them.
     17
     18        Fixes <http://webkit.org/b/49407> Windows builders kick off builds for
     19        lots irrelevant changes (e.g., rebaselining Chromium test results)
     20
     21        Reviewed by Eric Seidel.
     22
     23        * BuildSlaveSupport/build.webkit.org-config/config.json: Use a
     24        PlatformSpecificScheduler for the Windows builders.
     25
     26        * BuildSlaveSupport/build.webkit.org-config/master.cfg:
     27        (PlatformSpecificScheduler.__init__): Added. Stores our platform, sets
     28        up a ChangeFilter that filters to our branch and will call through to
     29        our filter method, and calls up to our base class.
     30        (PlatformSpecificScheduler.filter): Calls through to
     31        build.should_build to find out whether we should trigger a build for
     32        this change.
     33
     34        * Scripts/webkitpy/common/net/build.py: Added.
     35        (_should_file_trigger_build): Uses a set of directories and regexp
     36        patterns to determine whether the given file should trigger a build on
     37        the given platform. As mentioned earlier, this has only been
     38        implemented for Windows, though I did try to make some guesses about
     39        other platforms.
     40        (should_build): Returns true if any of the files should trigger a
     41        build on the given platform.
     42
     43        * Scripts/webkitpy/common/net/build_unittest.py: Added.
     44        (ShouldBuildTest.test_should_build): Does some basic testing to make
     45        sure we're triggering builds for the right files. It only tests
     46        Windows for now, though I tried to make some guesses about other
     47        platforms.
     48
    1492010-11-16  Simon Hausmann  <simon.hausmann@nokia.com>
    250
Note: See TracChangeset for help on using the changeset viewer.