Title: [234220] trunk/Tools
Revision
234220
Author
[email protected]
Date
2018-07-25 17:22:54 -0700 (Wed, 25 Jul 2018)

Log Message

[ews-build] Add build steps DownloadBuiltProduct and ExtractBuiltProduct
https://bugs.webkit.org/show_bug.cgi?id=188031

Reviewed by Lucas Forschler.

* BuildSlaveSupport/ews-build/steps.py:
(DownloadBuiltProduct): Added build step DownloadBuiltProduct.
(ExtractBuiltProduct): Added build step ExtractBuiltProduct.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2018-07-26 00:19:45 UTC (rev 234219)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2018-07-26 00:22:54 UTC (rev 234220)
@@ -26,6 +26,7 @@
 from buildbot.steps.source import svn
 from twisted.internet import defer
 
+EWS_URL = 'http://ews-build.webkit-uat.org/'
 WithProperties = properties.WithProperties
 
 
@@ -308,3 +309,24 @@
         kwargs['mode'] = 0644
         kwargs['blocksize'] = 1024 * 256
         transfer.FileUpload.__init__(self, **kwargs)
+
+
+class DownloadBuiltProduct(shell.ShellCommand):
+    command = ['python', 'Tools/BuildSlaveSupport/download-built-product',
+        WithProperties('--platform=%(platform)s'), WithProperties('--%(configuration)s'),
+        WithProperties(EWS_URL + 'archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(ewspatchid)s.zip')]
+    name = 'download-built-product'
+    description = ['downloading built product']
+    descriptionDone = ['downloaded built product']
+    haltOnFailure = True
+    flunkOnFailure = True
+
+
+class ExtractBuiltProduct(shell.ShellCommand):
+    command = ['python', 'Tools/BuildSlaveSupport/built-product-archive',
+               WithProperties('--platform=%(fullPlatform)s'), WithProperties('--%(configuration)s'), 'extract']
+    name = 'extract-built-product'
+    description = ['extracting built product']
+    descriptionDone = ['extracted built product']
+    haltOnFailure = True
+    flunkOnFailure = True

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2018-07-26 00:19:45 UTC (rev 234219)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2018-07-26 00:22:54 UTC (rev 234220)
@@ -822,5 +822,41 @@
         return self.runStep()
 
 
+class TestExtractBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
+    def setUp(self):
+        self.longMessage = True
+        return self.setUpBuildStep()
+
+    def tearDown(self):
+        return self.tearDownBuildStep()
+
+    def test_success(self):
+        self.setupStep(ExtractBuiltProduct())
+        self.setProperty('fullPlatform', 'ios-simulator')
+        self.setProperty('configuration', 'release')
+        self.expectRemoteCommands(
+            ExpectShell(workdir='wkdir',
+                        command=['python', 'Tools/BuildSlaveSupport/built-product-archive', '--platform=ios-simulator',  '--release', 'extract'],
+                        )
+            + 0,
+        )
+        self.expectOutcome(result=SUCCESS, state_string='extracted built product')
+        return self.runStep()
+
+    def test_failure(self):
+        self.setupStep(ExtractBuiltProduct())
+        self.setProperty('fullPlatform', 'mac-sierra')
+        self.setProperty('configuration', 'debug')
+        self.expectRemoteCommands(
+            ExpectShell(workdir='wkdir',
+                        command=['python', 'Tools/BuildSlaveSupport/built-product-archive', '--platform=mac-sierra',  '--debug', 'extract'],
+                        )
+            + ExpectShell.log('stdio', stdout='Unexpected failure.')
+            + 2,
+        )
+        self.expectOutcome(result=FAILURE, state_string='extracted built product (failure)')
+        return self.runStep()
+
+
 if __name__ == '__main__':
     unittest.main()

Modified: trunk/Tools/ChangeLog (234219 => 234220)


--- trunk/Tools/ChangeLog	2018-07-26 00:19:45 UTC (rev 234219)
+++ trunk/Tools/ChangeLog	2018-07-26 00:22:54 UTC (rev 234220)
@@ -1,5 +1,17 @@
 2018-07-25  Aakash Jain  <[email protected]>
 
+        [ews-build] Add build steps DownloadBuiltProduct and ExtractBuiltProduct
+        https://bugs.webkit.org/show_bug.cgi?id=188031
+
+        Reviewed by Lucas Forschler.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (DownloadBuiltProduct): Added build step DownloadBuiltProduct.
+        (ExtractBuiltProduct): Added build step ExtractBuiltProduct.
+        * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
+
+2018-07-25  Aakash Jain  <[email protected]>
+
         [ews-build] Add build step UploadBuiltProduct
         https://bugs.webkit.org/show_bug.cgi?id=188016
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to