Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (251449 => 251450)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-10-22 20:29:11 UTC (rev 251449)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-10-22 20:40:06 UTC (rev 251450)
@@ -36,6 +36,7 @@
BUG_SERVER_URL = 'https://bugs.webkit.org/'
S3URL = 'https://s3-us-west-2.amazonaws.com/'
+EWS_URL = 'https://ews-build.webkit.org/'
WithProperties = properties.WithProperties
Interpolate = properties.Interpolate
@@ -1297,8 +1298,7 @@
name = 'download-built-product'
description = ['downloading built product']
descriptionDone = ['Downloaded built product']
- haltOnFailure = True
- flunkOnFailure = True
+ flunkOnFailure = False
def getResultSummary(self):
if self.results != SUCCESS:
@@ -1308,7 +1308,29 @@
def __init__(self, **kwargs):
super(DownloadBuiltProduct, self).__init__(logEnviron=False, **kwargs)
+ def evaluateCommand(self, cmd):
+ rc = shell.ShellCommand.evaluateCommand(self, cmd)
+ if rc == FAILURE:
+ self.build.addStepsAfterCurrentStep([DownloadBuiltProductFromMaster()])
+ return rc
+
+class DownloadBuiltProductFromMaster(DownloadBuiltProduct):
+ command = ['python', 'Tools/BuildSlaveSupport/download-built-product',
+ WithProperties('--%(configuration)s'),
+ WithProperties(EWS_URL + 'archives/%(fullPlatform)s-%(architecture)s-%(configuration)s/%(patch_id)s.zip')]
+ haltOnFailure = True
+ flunkOnFailure = True
+
+ def getResultSummary(self):
+ if self.results != SUCCESS:
+ return {u'step': u'Failed to download built product from build master'}
+ return shell.ShellCommand.getResultSummary(self)
+
+ def evaluateCommand(self, cmd):
+ return shell.ShellCommand.evaluateCommand(self, cmd)
+
+
class ExtractBuiltProduct(shell.ShellCommand):
command = ['python', 'Tools/BuildSlaveSupport/built-product-archive',
WithProperties('--platform=%(fullPlatform)s'), WithProperties('--%(configuration)s'), 'extract']
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py (251449 => 251450)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-10-22 20:29:11 UTC (rev 251449)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-10-22 20:40:06 UTC (rev 251450)
@@ -37,7 +37,7 @@
from steps import (AnalyzeAPITestsResults, AnalyzeCompileWebKitResults, AnalyzeLayoutTestsResults, ApplyPatch, ApplyWatchList, ArchiveBuiltProduct, ArchiveTestResults,
CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, CheckStyle, CleanBuild, CleanUpGitIndexLock, CleanWorkingDirectory,
CompileJSC, CompileJSCToT, CompileWebKit, CompileWebKitToT, ConfigureBuild,
- DownloadBuiltProduct, ExtractBuiltProduct, ExtractTestResults, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
+ DownloadBuiltProduct, DownloadBuiltProductFromMaster, ExtractBuiltProduct, ExtractTestResults, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
PrintConfiguration, ReRunAPITests, ReRunJavaScriptCoreTests, ReRunWebKitTests, RunAPITests, RunAPITestsWithoutPatch,
RunBindingsTests, RunBuildWebKitOrgUnitTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests, RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests,
RunWebKitPerlTests, RunWebKitPyTests, RunWebKitTests, TestWithFailureCount, Trigger, TransferToS3, UnApplyPatchIfRequired,
@@ -1720,6 +1720,48 @@
return self.runStep()
+class TestDownloadBuiltProductFromMaster(BuildStepMixinAdditions, unittest.TestCase):
+ def setUp(self):
+ self.longMessage = True
+ return self.setUpBuildStep()
+
+ def tearDown(self):
+ return self.tearDownBuildStep()
+
+ def test_success(self):
+ self.setupStep(DownloadBuiltProductFromMaster())
+ self.setProperty('fullPlatform', 'ios-simulator-12')
+ self.setProperty('configuration', 'release')
+ self.setProperty('architecture', 'x86_64')
+ self.setProperty('patch_id', '1234')
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ command=['python', 'Tools/BuildSlaveSupport/download-built-product', '--release', 'https://ews-build.webkit.org/archives/ios-simulator-12-x86_64-release/1234.zip'],
+ )
+ + 0,
+ )
+ self.expectOutcome(result=SUCCESS, state_string='Downloaded built product')
+ return self.runStep()
+
+ def test_failure(self):
+ self.setupStep(DownloadBuiltProductFromMaster())
+ self.setProperty('fullPlatform', 'mac-sierra')
+ self.setProperty('configuration', 'debug')
+ self.setProperty('architecture', 'x86_64')
+ self.setProperty('patch_id', '123456')
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ command=['python', 'Tools/BuildSlaveSupport/download-built-product', '--debug', 'https://ews-build.webkit.org/archives/mac-sierra-x86_64-debug/123456.zip'],
+ )
+ + ExpectShell.log('stdio', stdout='Unexpected failure.')
+ + 2,
+ )
+ self.expectOutcome(result=FAILURE, state_string='Failed to download built product from build master')
+ return self.runStep()
+
+
class TestExtractBuiltProduct(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True