Title: [257157] trunk/Tools
- Revision
- 257157
- Author
- [email protected]
- Date
- 2020-02-21 13:12:03 -0800 (Fri, 21 Feb 2020)
Log Message
[ews] Add build step to Validate ChangeLog for commit-queue
https://bugs.webkit.org/show_bug.cgi?id=208064
Reviewed by Jonathan Bedard.
* BuildSlaveSupport/ews-build/steps.py:
(ValidateChangeLogAndReviewer): Build step to validate ChangeLog.
(ValidateChangeLogAndReviewer.start):
(ValidateChangeLogAndReviewer.evaluateCommand): If the validation fails, comment on bug and mark patch as cq-.
(SetCommitQueueMinusFlagOnPatch.start): End the build (after marking the patch cq-) if build_finish_summary property is set.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (257156 => 257157)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2020-02-21 20:26:30 UTC (rev 257156)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2020-02-21 21:12:03 UTC (rev 257157)
@@ -583,13 +583,47 @@
return None
+class ValidateChangeLogAndReviewer(shell.ShellCommand):
+ name = 'validate-changelog-and-reviewer'
+ descriptionDone = ['Validated ChangeLog and Reviewer']
+ command = ['python', 'Tools/Scripts/webkit-patch', 'validate-changelog', '--check-oops', '--non-interactive']
+ haltOnFailure = False
+ flunkOnFailure = True
+
+ def __init__(self, **kwargs):
+ shell.ShellCommand.__init__(self, timeout=3 * 60, logEnviron=False, **kwargs)
+
+ def start(self):
+ self.log_observer = logobserver.BufferLogObserver(wantStderr=True)
+ self.addLogObserver('stdio', self.log_observer)
+ return shell.ShellCommand.start(self)
+
+ def getResultSummary(self):
+ if self.results != SUCCESS:
+ return {u'step': u'ChangeLog validation failed'}
+ return shell.ShellCommand.getResultSummary(self)
+
+ def evaluateCommand(self, cmd):
+ rc = shell.ShellCommand.evaluateCommand(self, cmd)
+ if rc == FAILURE:
+ log_text = self.log_observer.getStdout() + self.log_observer.getStderr()
+ self.setProperty('bugzilla_comment_text', log_text)
+ self.setProperty('build_finish_summary', 'ChangeLog validation failed')
+ self.build.addStepsAfterCurrentStep([CommentOnBug(), SetCommitQueueMinusFlagOnPatch()])
+ return rc
+
+
class SetCommitQueueMinusFlagOnPatch(buildstep.BuildStep, BugzillaMixin):
name = 'set-cq-minus-flag-on-patch'
def start(self):
patch_id = self.getProperty('patch_id', '')
+ build_finish_summary = self.getProperty('build_finish_summary', None)
+
rc = self.set_cq_minus_flag_on_patch(patch_id)
self.finished(rc)
+ if build_finish_summary:
+ self.build.buildFinished([build_finish_summary], FAILURE)
return None
def getResultSummary(self):
Modified: trunk/Tools/ChangeLog (257156 => 257157)
--- trunk/Tools/ChangeLog 2020-02-21 20:26:30 UTC (rev 257156)
+++ trunk/Tools/ChangeLog 2020-02-21 21:12:03 UTC (rev 257157)
@@ -1,5 +1,18 @@
2020-02-21 Aakash Jain <[email protected]>
+ [ews] Add build step to Validate ChangeLog for commit-queue
+ https://bugs.webkit.org/show_bug.cgi?id=208064
+
+ Reviewed by Jonathan Bedard.
+
+ * BuildSlaveSupport/ews-build/steps.py:
+ (ValidateChangeLogAndReviewer): Build step to validate ChangeLog.
+ (ValidateChangeLogAndReviewer.start):
+ (ValidateChangeLogAndReviewer.evaluateCommand): If the validation fails, comment on bug and mark patch as cq-.
+ (SetCommitQueueMinusFlagOnPatch.start): End the build (after marking the patch cq-) if build_finish_summary property is set.
+
+2020-02-21 Aakash Jain <[email protected]>
+
[ews] Add build step to set cq- flag on bugzilla patch
https://bugs.webkit.org/show_bug.cgi?id=208021
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes