Title: [259464] trunk/Tools
Revision
259464
Author
[email protected]
Date
2020-04-03 09:26:51 -0700 (Fri, 03 Apr 2020)

Log Message

[ews] Improve error message when patch fails to apply to trunk
https://bugs.webkit.org/show_bug.cgi?id=209965

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(ApplyPatch.getResultSummary): Improved error message.
(ApplyPatch.evaluateCommand): Ditto.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (259463 => 259464)


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2020-04-03 15:58:59 UTC (rev 259463)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2020-04-03 16:26:51 UTC (rev 259464)
@@ -222,7 +222,7 @@
 
     def getResultSummary(self):
         if self.results != SUCCESS:
-            return {u'step': u'Patch does not apply'}
+            return {u'step': u'svn-apply failed to apply patch to trunk'}
         return super(ApplyPatch, self).getResultSummary()
 
     def evaluateCommand(self, cmd):
@@ -229,9 +229,10 @@
         rc = shell.ShellCommand.evaluateCommand(self, cmd)
         patch_id = self.getProperty('patch_id', '')
         if rc == FAILURE:
-            message = 'Patch {} does not apply'.format(patch_id)
+            message = 'Tools/Scripts/svn-apply failed to apply patch {} to trunk'.format(patch_id)
             if self.getProperty('buildername', '').lower() == 'commit-queue':
-                self.setProperty('bugzilla_comment_text', message.replace('Patch', 'Attachment'))
+                comment_text = '{}.\nPlease resolve the conflicts and upload a new patch.'.format(message.replace('patch', 'attachment'))
+                self.setProperty('bugzilla_comment_text', comment_text)
                 self.setProperty('build_finish_summary', message)
                 self.build.addStepsAfterCurrentStep([CommentOnBug(), SetCommitQueueMinusFlagOnPatch()])
             else:

Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py (259463 => 259464)


--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2020-04-03 15:58:59 UTC (rev 259463)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2020-04-03 16:26:51 UTC (rev 259464)
@@ -2081,7 +2081,7 @@
             ExpectShell.log('stdio', stdout='Unexpected failure.') +
             2,
         )
-        self.expectOutcome(result=FAILURE, state_string='Patch does not apply')
+        self.expectOutcome(result=FAILURE, state_string='svn-apply failed to apply patch to trunk')
         rc = self.runStep()
         self.assertEqual(self.getProperty('bugzilla_comment_text'), None)
         self.assertEqual(self.getProperty('build_finish_summary'), None)
@@ -2100,10 +2100,10 @@
             ExpectShell.log('stdio', stdout='Unexpected failure.') +
             2,
         )
-        self.expectOutcome(result=FAILURE, state_string='Patch does not apply')
+        self.expectOutcome(result=FAILURE, state_string='svn-apply failed to apply patch to trunk')
         rc = self.runStep()
-        self.assertEqual(self.getProperty('bugzilla_comment_text'), 'Attachment 1234 does not apply')
-        self.assertEqual(self.getProperty('build_finish_summary'), 'Patch 1234 does not apply')
+        self.assertEqual(self.getProperty('bugzilla_comment_text'), 'Tools/Scripts/svn-apply failed to apply attachment 1234 to trunk.\nPlease resolve the conflicts and upload a new patch.')
+        self.assertEqual(self.getProperty('build_finish_summary'), 'Tools/Scripts/svn-apply failed to apply patch 1234 to trunk')
         return rc
 
 

Modified: trunk/Tools/ChangeLog (259463 => 259464)


--- trunk/Tools/ChangeLog	2020-04-03 15:58:59 UTC (rev 259463)
+++ trunk/Tools/ChangeLog	2020-04-03 16:26:51 UTC (rev 259464)
@@ -1,3 +1,15 @@
+2020-04-03  Aakash Jain  <[email protected]>
+
+        [ews] Improve error message when patch fails to apply to trunk
+        https://bugs.webkit.org/show_bug.cgi?id=209965
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (ApplyPatch.getResultSummary): Improved error message.
+        (ApplyPatch.evaluateCommand): Ditto.
+        * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
+
 2020-04-03  Sihui Liu  <[email protected]>
 
         ASSERTION FAILED: m_delegate in IDBConnectionToClient::identifier()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to