Changeset 246651 in webkit
- Timestamp:
- Jun 20, 2019, 1:35:57 PM (7 years ago)
- Location:
- trunk/Tools
- Files:
-
- 4 edited
-
BuildSlaveSupport/ews-build/factories.py (modified) (2 diffs)
-
BuildSlaveSupport/ews-build/steps.py (modified) (2 diffs)
-
BuildSlaveSupport/ews-build/steps_unittest.py (modified) (2 diffs)
-
ChangeLog (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/BuildSlaveSupport/ews-build/factories.py
r244549 r246651 25 25 from buildbot.steps import trigger 26 26 27 from steps import (ApplyPatch, CheckOutSource, Check PatchRelevance, CheckStyle,28 C ompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, ConfigureBuild,27 from steps import (ApplyPatch, CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, 28 CheckStyle, CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, ConfigureBuild, 29 29 DownloadBuiltProduct, ExtractBuiltProduct, KillOldProcesses, 30 30 PrintConfiguration, ReRunJavaScriptCoreTests, RunAPITests, RunBindingsTests, … … 42 42 self.addStep(PrintConfiguration()) 43 43 self.addStep(CheckOutSource()) 44 # CheckOutSource step pulls the latest revision, since we use alwaysUseLatest=True. Without alwaysUseLatest Buildbot will 45 # automatically apply the patch to the repo, and that doesn't handle ChangeLogs well. See https://webkit.org/b/193138 46 # Therefore we add CheckOutSpecificRevision step to checkout required revision. 47 self.addStep(CheckOutSpecificRevision()) 44 48 self.addStep(ApplyPatch()) 45 49 -
trunk/Tools/BuildSlaveSupport/ews-build/steps.py
r246613 r246651 108 108 109 109 110 class CheckOutSpecificRevision(shell.ShellCommand): 111 name = 'checkout-specific-revision' 112 descriptionDone = ['Checked out required revision'] 113 flunkOnFailure = False 114 haltOnFailure = False 115 116 def doStepIf(self, step): 117 return self.getProperty('ews_revision', False) 118 119 def hideStepIf(self, results, step): 120 return not self.doStepIf(step) 121 122 def start(self): 123 self.setCommand(['git', 'checkout', self.getProperty('ews_revision')]) 124 return shell.ShellCommand.start(self) 125 126 110 127 class CleanWorkingDirectory(shell.ShellCommand): 111 128 name = 'clean-working-directory' … … 405 422 'architecture': properties.Property('architecture'), 406 423 'owner': properties.Property('owner'), 424 'ews_revision': properties.Property('got_revision'), 407 425 } 408 426 -
trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py
r246650 r246651 36 36 37 37 from steps import (AnalyzeAPITestsResults, AnalyzeCompileWebKitResults, ApplyPatch, ArchiveBuiltProduct, ArchiveTestResults, 38 CheckOutSource, Check PatchRelevance, CheckStyle, CleanBuild, CleanWorkingDirectory,38 CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, CheckStyle, CleanBuild, CleanWorkingDirectory, 39 39 CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, CompileWebKitToT, ConfigureBuild, 40 40 DownloadBuiltProduct, ExtractBuiltProduct, ExtractTestResults, KillOldProcesses, … … 868 868 ) 869 869 self.expectOutcome(result=FAILURE, state_string='layout-tests (failure)') 870 return self.runStep() 871 872 873 class TestCheckOutSpecificRevision(BuildStepMixinAdditions, unittest.TestCase): 874 def setUp(self): 875 self.longMessage = True 876 return self.setUpBuildStep() 877 878 def tearDown(self): 879 return self.tearDownBuildStep() 880 881 def test_success(self): 882 self.setupStep(CheckOutSpecificRevision()) 883 self.setProperty('ews_revision', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26') 884 self.expectHidden(False) 885 self.expectRemoteCommands( 886 ExpectShell(workdir='wkdir', 887 timeout=1200, 888 command=['git', 'checkout', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26'], 889 ) 890 + 0, 891 ) 892 self.expectOutcome(result=SUCCESS, state_string='Checked out required revision') 893 return self.runStep() 894 895 def test_failure(self): 896 self.setupStep(CheckOutSpecificRevision()) 897 self.setProperty('ews_revision', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26') 898 self.expectHidden(False) 899 self.expectRemoteCommands( 900 ExpectShell(workdir='wkdir', 901 timeout=1200, 902 command=['git', 'checkout', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26'], 903 ) 904 + ExpectShell.log('stdio', stdout='Unexpected failure') 905 + 2, 906 ) 907 self.expectOutcome(result=FAILURE, state_string='Checked out required revision (failure)') 908 return self.runStep() 909 910 def test_skip(self): 911 self.setupStep(CheckOutSpecificRevision()) 912 self.expectHidden(True) 913 self.expectOutcome(result=SKIPPED, state_string='Checked out required revision (skipped)') 870 914 return self.runStep() 871 915 -
trunk/Tools/ChangeLog
r246650 r246651 1 2019-06-20 Aakash Jain <aakash_jain@apple.com> 2 3 [ews-build] Triggered builds should use same revision as parent build 4 https://bugs.webkit.org/show_bug.cgi?id=198289 5 6 Reviewed by Jonathan Bedard. 7 8 * BuildSlaveSupport/ews-build/steps.py: 9 (CheckOutSpecificRevision): Build step to checkout specific revision. 10 (CheckOutSpecificRevision.doStepIf): Run this step only if ews_revision property is set. 11 (CheckOutSpecificRevision.hideStepIf): Hide this step when it is skipped. 12 (CheckOutSpecificRevision.start): Run appropriate git command. 13 (Trigger.propertiesToPassToTriggers): Pass ews_revision property to triggered builds, so that triggered 14 builds use same revision as parent build. 15 * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. 16 * BuildSlaveSupport/ews-build/factories.py: 17 (Factory.__init__): Added CheckOutSpecificRevision step. 18 1 19 2019-06-20 Aakash Jain <aakash_jain@apple.com> 2 20
Note:
See TracChangeset
for help on using the changeset viewer.