Changeset 51942 in webkit


Ignore:
Timestamp:
Dec 10, 2009 12:33:26 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-10 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

[bzt] Convert more commands to StepSequences
https://bugs.webkit.org/show_bug.cgi?id=32362

We should eventually convert all the commands, but I'm starting with
the easy ones.

  • Scripts/modules/commands/download.py:
Location:
trunk/WebKitTools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r51941 r51942  
     12009-12-10  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        [bzt] Convert more commands to StepSequences
     6        https://bugs.webkit.org/show_bug.cgi?id=32362
     7
     8        We should eventually convert all the commands, but I'm starting with
     9        the easy ones.
     10
     11        * Scripts/modules/commands/download.py:
     12
    1132009-12-10  Xan Lopez  <xlopez@igalia.com>
    214
  • trunk/WebKitTools/Scripts/modules/commands/download.py

    r51923 r51942  
    3434
    3535from modules.bugzilla import parse_bug_id
    36 from modules.buildsteps import CommandOptions, BuildSteps, EnsureBuildersAreGreenStep, CleanWorkingDirectoryStep, UpdateStep, BuildStep, CheckStyleStep, PrepareChangelogStep
     36from modules.buildsteps import CommandOptions, BuildSteps, EnsureBuildersAreGreenStep, CleanWorkingDirectoryStep, UpdateStep, ApplyPatchStep, BuildStep, CheckStyleStep, PrepareChangelogStep
    3737from modules.changelogs import ChangeLog
    3838from modules.comments import bug_comment_from_commit_text
     
    225225
    226226
    227 class CheckStyleSequence(LandingSequence):
    228     def run(self):
    229         self.clean()
    230         self.update()
    231         self.apply_patch()
    232         self.build()
    233 
    234     def build(self):
    235         # Instead of building, we check style.
    236         step = CheckStyleStep(self._tool, self._options)
    237         step.run()
    238 
    239 
    240227class CheckStyle(AbstractPatchProcessingCommand):
    241228    name = "check-style"
    242229    show_in_main_help = False
    243230    def __init__(self):
    244         options = BuildSteps.cleaning_options()
    245         options += BuildSteps.build_options()
    246         options += BuildSteps.land_options()
    247         AbstractPatchProcessingCommand.__init__(self, "Run check-webkit-style on the specified attachments", "ATTACHMENT_ID [ATTACHMENT_IDS]", options)
     231        self._sequence = StepSequence([
     232            CleanWorkingDirectoryStep,
     233            UpdateStep,
     234            ApplyPatchStep,
     235            CheckStyleStep,
     236        ])
     237        AbstractPatchProcessingCommand.__init__(self, "Run check-webkit-style on the specified attachments", "ATTACHMENT_ID [ATTACHMENT_IDS]", self._sequence.options())
    248238
    249239    def _fetch_list_of_patches_to_process(self, options, args, tool):
     
    254244
    255245    def _process_patch(self, patch, options, args, tool):
    256         sequence = CheckStyleSequence(patch, options, tool)
    257         sequence.run_and_handle_errors()
    258 
    259 
    260 class BuildAttachmentSequence(LandingSequence):
    261     def run(self):
    262         self.clean()
    263         self.update()
    264         self.apply_patch()
    265         self.build()
     246        self._sequence.run_and_handle_errors(tool, options, patch)
    266247
    267248
     
    270251    show_in_main_help = False
    271252    def __init__(self):
    272         options = BuildSteps.cleaning_options()
    273         options += BuildSteps.build_options()
    274         options += BuildSteps.land_options()
    275         AbstractPatchProcessingCommand.__init__(self, "Apply and build patches from bugzilla", "ATTACHMENT_ID [ATTACHMENT_IDS]", options)
     253        self._sequence = StepSequence([
     254            CleanWorkingDirectoryStep,
     255            UpdateStep,
     256            ApplyPatchStep,
     257            BuildStep,
     258        ])
     259        AbstractPatchProcessingCommand.__init__(self, "Apply and build patches from bugzilla", "ATTACHMENT_ID [ATTACHMENT_IDS]", self._sequence.options())
    276260
    277261    def _fetch_list_of_patches_to_process(self, options, args, tool):
     
    282266
    283267    def _process_patch(self, patch, options, args, tool):
    284         sequence = BuildAttachmentSequence(patch, options, tool)
    285         sequence.run_and_handle_errors()
     268        self._sequence.run_and_handle_errors(tool, options, patch)
    286269
    287270
Note: See TracChangeset for help on using the changeset viewer.