Title: [244533] trunk/Tools
- Revision
- 244533
- Author
- aakash_j...@apple.com
- Date
- 2019-04-22 17:22:06 -0700 (Mon, 22 Apr 2019)
Log Message
[ews-build] Improve summary for UploadBuiltProduct step
https://bugs.webkit.org/show_bug.cgi?id=197182
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(UploadBuiltProduct): Added descriptionDone.
(UploadBuiltProduct.getResultSummary): Overrided getResultSummary.
* BuildSlaveSupport/ews-build/steps_unittest.py:
(TestUploadBuiltProduct.test_success): Updated unit-test.
(TestUploadBuiltProduct.test_failure): Added unit-test for failure case.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (244532 => 244533)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-04-23 00:16:48 UTC (rev 244532)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-04-23 00:22:06 UTC (rev 244533)
@@ -685,6 +685,7 @@
name = 'upload-built-product'
workersrc = WithProperties('WebKitBuild/%(configuration)s.zip')
masterdest = WithProperties('public_html/archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(patch_id)s.zip')
+ descriptionDone = ['Uploaded built product']
haltOnFailure = True
def __init__(self, **kwargs):
@@ -702,7 +703,12 @@
return super(UploadBuiltProduct, self).finished(results)
+ def getResultSummary(self):
+ if self.results != SUCCESS:
+ return {u'step': u'Failed to upload built product'}
+ return super(UploadBuiltProduct, self).getResultSummary()
+
class DownloadBuiltProduct(shell.ShellCommand):
command = ['python', 'Tools/BuildSlaveSupport/download-built-product',
WithProperties('--platform=%(platform)s'), WithProperties('--%(configuration)s'),
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py (244532 => 244533)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-04-23 00:16:48 UTC (rev 244532)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-04-23 00:22:06 UTC (rev 244533)
@@ -889,10 +889,31 @@
)
self.expectUploadedFile('public_html/archives/mac-sierra-x86_64-release/1234.zip')
- self.expectOutcome(result=SUCCESS, state_string='uploading release.zip')
+ self.expectOutcome(result=SUCCESS, state_string='Uploaded built product')
return self.runStep()
+ def test_failure(self):
+ self.setupStep(UploadBuiltProduct())
+ self.setProperty('fullPlatform', 'mac-sierra')
+ self.setProperty('configuration', 'release')
+ self.setProperty('architecture', 'x86_64')
+ self.setProperty('patch_id', '1234')
+ self.expectHidden(False)
+ self.expectRemoteCommands(
+ Expect('uploadFile', dict(
+ workersrc='WebKitBuild/release.zip', workdir='wkdir',
+ blocksize=1024 * 256, maxsize=None, keepstamp=False,
+ writer=ExpectRemoteRef(remotetransfer.FileWriter),
+ ))
+ + Expect.behavior(uploadFileWithContentsOfString('Dummy zip file content.'))
+ + 1,
+ )
+ self.expectUploadedFile('public_html/archives/mac-sierra-x86_64-release/1234.zip')
+ self.expectOutcome(result=FAILURE, state_string='Failed to upload built product')
+ return self.runStep()
+
+
class TestExtractBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True
Modified: trunk/Tools/ChangeLog (244532 => 244533)
--- trunk/Tools/ChangeLog 2019-04-23 00:16:48 UTC (rev 244532)
+++ trunk/Tools/ChangeLog 2019-04-23 00:22:06 UTC (rev 244533)
@@ -1,5 +1,19 @@
2019-04-22 Aakash Jain <aakash_j...@apple.com>
+ [ews-build] Improve summary for UploadBuiltProduct step
+ https://bugs.webkit.org/show_bug.cgi?id=197182
+
+ Reviewed by Lucas Forschler.
+
+ * BuildSlaveSupport/ews-build/steps.py:
+ (UploadBuiltProduct): Added descriptionDone.
+ (UploadBuiltProduct.getResultSummary): Overrided getResultSummary.
+ * BuildSlaveSupport/ews-build/steps_unittest.py:
+ (TestUploadBuiltProduct.test_success): Updated unit-test.
+ (TestUploadBuiltProduct.test_failure): Added unit-test for failure case.
+
+2019-04-22 Aakash Jain <aakash_j...@apple.com>
+
[ews-build] Trigger queues only after uploading the archive
https://bugs.webkit.org/show_bug.cgi?id=197180
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes