WebKit Bugzilla
Attachment 372579 Details for
Bug 198289
: [ews-build] Triggered builds should use same revision as parent build
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198289-20190620160838.patch (text/plain), 7.08 KB, created by
Aakash Jain
on 2019-06-20 13:08:40 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Aakash Jain
Created:
2019-06-20 13:08:40 PDT
Size:
7.08 KB
patch
obsolete
>Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 246646) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,21 @@ >+2019-06-20 Aakash Jain <aakash_jain@apple.com> >+ >+ [ews-build] Triggered builds should use same revision as parent build >+ https://bugs.webkit.org/show_bug.cgi?id=198289 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * BuildSlaveSupport/ews-build/steps.py: >+ (CheckOutSpecificRevision): Build step to checkout specific revision. >+ (CheckOutSpecificRevision.doStepIf): Run this step only if ews_revision property is set. >+ (CheckOutSpecificRevision.hideStepIf): Hide this step when it is skipped. >+ (CheckOutSpecificRevision.start): Run appropriate git command. >+ (Trigger.propertiesToPassToTriggers): Pass ews_revision property to triggered builds, so that triggered >+ builds use same revision as parent build. >+ * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. >+ * BuildSlaveSupport/ews-build/factories.py: >+ (Factory.__init__): Added CheckOutSpecificRevision step. >+ > 2019-06-20 Alexander Mikhaylenko <exalm7659@gmail.com> > > [GTK] Enable navigation swipe layout tests >Index: Tools/BuildSlaveSupport/ews-build/factories.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/factories.py (revision 246646) >+++ Tools/BuildSlaveSupport/ews-build/factories.py (working copy) >@@ -24,8 +24,8 @@ > from buildbot.process import factory > from buildbot.steps import trigger > >-from steps import (ApplyPatch, CheckOutSource, CheckPatchRelevance, CheckStyle, >- CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, ConfigureBuild, >+from steps import (ApplyPatch, CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, >+ CheckStyle, CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, ConfigureBuild, > DownloadBuiltProduct, ExtractBuiltProduct, KillOldProcesses, > PrintConfiguration, ReRunJavaScriptCoreTests, RunAPITests, RunBindingsTests, > RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests, RunWebKitPerlTests, >@@ -41,6 +41,10 @@ class Factory(factory.BuildFactory): > self.addStep(ValidatePatch()) > self.addStep(PrintConfiguration()) > self.addStep(CheckOutSource()) >+ # CheckOutSource step pulls the latest revision, since we use alwaysUseLatest=True. Without alwaysUseLatest Buildbot will >+ # automatically apply the patch to the repo, and that doesn't handle ChangeLogs well. See https://webkit.org/b/193138 >+ # Therefore we add CheckOutSpecificRevision step to checkout required revision. >+ self.addStep(CheckOutSpecificRevision()) > self.addStep(ApplyPatch()) > > >Index: Tools/BuildSlaveSupport/ews-build/steps.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps.py (revision 246646) >+++ Tools/BuildSlaveSupport/ews-build/steps.py (working copy) >@@ -107,6 +107,23 @@ class CheckOutSource(git.Git): > return {u'step': u'Cleaned and updated working directory'} > > >+class CheckOutSpecificRevision(shell.ShellCommand): >+ name = 'checkout-specific-revision' >+ descriptionDone = ['Checked out required revision'] >+ flunkOnFailure = False >+ haltOnFailure = False >+ >+ def doStepIf(self, step): >+ return self.getProperty('ews_revision', False) >+ >+ def hideStepIf(self, results, step): >+ return not self.doStepIf(step) >+ >+ def start(self): >+ self.setCommand(['git', 'checkout', self.getProperty('ews_revision')]) >+ return shell.ShellCommand.start(self) >+ >+ > class CleanWorkingDirectory(shell.ShellCommand): > name = 'clean-working-directory' > description = ['clean-working-directory running'] >@@ -404,6 +421,7 @@ class Trigger(trigger.Trigger): > 'fullPlatform': properties.Property('fullPlatform'), > 'architecture': properties.Property('architecture'), > 'owner': properties.Property('owner'), >+ 'ews_revision': properties.Property('got_revision'), > } > > >Index: Tools/BuildSlaveSupport/ews-build/steps_unittest.py >=================================================================== >--- Tools/BuildSlaveSupport/ews-build/steps_unittest.py (revision 246646) >+++ Tools/BuildSlaveSupport/ews-build/steps_unittest.py (working copy) >@@ -35,7 +35,7 @@ from twisted.python import failure, log > from twisted.trial import unittest > > from steps import (AnalyzeAPITestsResults, ApplyPatch, ArchiveBuiltProduct, ArchiveTestResults, >- CheckOutSource, CheckPatchRelevance, CheckStyle, CleanBuild, CleanWorkingDirectory, >+ CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, CheckStyle, CleanBuild, CleanWorkingDirectory, > CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, CompileWebKitToT, ConfigureBuild, > DownloadBuiltProduct, ExtractBuiltProduct, ExtractTestResults, KillOldProcesses, > PrintConfiguration, ReRunAPITests, ReRunJavaScriptCoreTests, RunAPITests, RunAPITestsWithoutPatch, >@@ -836,6 +836,50 @@ class TestRunWebKit1Tests(BuildStepMixin > return self.runStep() > > >+class TestCheckOutSpecificRevision(BuildStepMixinAdditions, unittest.TestCase): >+ def setUp(self): >+ self.longMessage = True >+ return self.setUpBuildStep() >+ >+ def tearDown(self): >+ return self.tearDownBuildStep() >+ >+ def test_success(self): >+ self.setupStep(CheckOutSpecificRevision()) >+ self.setProperty('ews_revision', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26') >+ self.expectHidden(False) >+ self.expectRemoteCommands( >+ ExpectShell(workdir='wkdir', >+ timeout=1200, >+ command=['git', 'checkout', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26'], >+ ) >+ + 0, >+ ) >+ self.expectOutcome(result=SUCCESS, state_string='Checked out required revision') >+ return self.runStep() >+ >+ def test_failure(self): >+ self.setupStep(CheckOutSpecificRevision()) >+ self.setProperty('ews_revision', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26') >+ self.expectHidden(False) >+ self.expectRemoteCommands( >+ ExpectShell(workdir='wkdir', >+ timeout=1200, >+ command=['git', 'checkout', '1a3425cb92dbcbca12a10aa9514f1b77c76dc26'], >+ ) >+ + ExpectShell.log('stdio', stdout='Unexpected failure') >+ + 2, >+ ) >+ self.expectOutcome(result=FAILURE, state_string='Checked out required revision (failure)') >+ return self.runStep() >+ >+ def test_skip(self): >+ self.setupStep(CheckOutSpecificRevision()) >+ self.expectHidden(True) >+ self.expectOutcome(result=SKIPPED, state_string='Checked out required revision (skipped)') >+ return self.runStep() >+ >+ > class TestCleanWorkingDirectory(BuildStepMixinAdditions, unittest.TestCase): > def setUp(self): > self.longMessage = True
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jbedard
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198289
:
372560
| 372579