Diff
Modified: trunk/Tools/BuildSlaveSupport/ews-build/factories.py (250349 => 250350)
--- trunk/Tools/BuildSlaveSupport/ews-build/factories.py 2019-09-25 17:14:14 UTC (rev 250349)
+++ trunk/Tools/BuildSlaveSupport/ews-build/factories.py 2019-09-25 18:35:11 UTC (rev 250350)
@@ -27,9 +27,9 @@
from steps import (ApplyPatch, ApplyWatchList, CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance,
CheckStyle, CompileJSC, CompileWebKit, ConfigureBuild,
DownloadBuiltProduct, ExtractBuiltProduct, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
- PrintConfiguration, ReRunJavaScriptCoreTests, RunAPITests, RunBindingsTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests,
- RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests, RunWebKitPerlTests,
- RunWebKitPyTests, RunWebKitTests, UnApplyPatchIfRequired, UpdateWorkingDirectory, ValidatePatch)
+ PrintConfiguration, RunAPITests, RunBindingsTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests,
+ RunJavaScriptCoreTests, RunWebKit1Tests, RunWebKitPerlTests,
+ RunWebKitPyTests, RunWebKitTests, UpdateWorkingDirectory, ValidatePatch)
class Factory(factory.BuildFactory):
@@ -120,9 +120,6 @@
Factory.__init__(self, platform, configuration, architectures, False, additionalArguments, checkRelevance=True)
self.addStep(CompileJSC(skipUpload=True))
self.addStep(RunJavaScriptCoreTests())
- self.addStep(ReRunJavaScriptCoreTests())
- self.addStep(UnApplyPatchIfRequired())
- self.addStep(RunJavaScriptCoreTestsToT())
class APITestsFactory(TestFactory):
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (250349 => 250350)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-09-25 17:14:14 UTC (rev 250349)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-09-25 18:35:11 UTC (rev 250350)
@@ -825,12 +825,6 @@
class CompileJSCToT(CompileJSC):
name = 'compile-jsc-tot'
- def doStepIf(self, step):
- return self.getProperty('patchFailedToBuild')
-
- def hideStepIf(self, results, step):
- return not self.doStepIf(step)
-
def evaluateCommand(self, cmd):
return shell.Compile.evaluateCommand(self, cmd)
@@ -849,24 +843,31 @@
return shell.Test.start(self)
def evaluateCommand(self, cmd):
- if cmd.didFail():
- self.setProperty('patchFailedTests', True)
+ rc = shell.Test.evaluateCommand(self, cmd)
+ if rc == SUCCESS or rc == WARNINGS:
+ message = 'Passed JSC tests'
+ self.descriptionDone = message
+ self.build.results = SUCCESS
+ self.build.buildFinished([message], SUCCESS)
+ else:
+ self.build.addStepsAfterCurrentStep([ReRunJavaScriptCoreTests()])
+ return rc
- return super(RunJavaScriptCoreTests, self).evaluateCommand(cmd)
-
class ReRunJavaScriptCoreTests(RunJavaScriptCoreTests):
name = 'jscore-test-rerun'
- def doStepIf(self, step):
- return self.getProperty('patchFailedTests')
-
- def hideStepIf(self, results, step):
- return not self.doStepIf(step)
-
def evaluateCommand(self, cmd):
- self.setProperty('patchFailedTests', cmd.didFail())
- return super(RunJavaScriptCoreTests, self).evaluateCommand(cmd)
+ rc = shell.Test.evaluateCommand(self, cmd)
+ if rc == SUCCESS or rc == WARNINGS:
+ message = 'Passed JSC tests'
+ self.descriptionDone = message
+ self.build.results = SUCCESS
+ self.build.buildFinished([message], SUCCESS)
+ else:
+ self.setProperty('patchFailedTests', True)
+ self.build.addStepsAfterCurrentStep([UnApplyPatchIfRequired(), CompileJSCToT(), RunJavaScriptCoreTestsToT()])
+ return rc
class RunJavaScriptCoreTestsToT(RunJavaScriptCoreTests):
@@ -874,13 +875,10 @@
jsonFileName = 'jsc_results.json'
command = ['perl', 'Tools/Scripts/run-_javascript_core-tests', '--no-fail-fast', '--json-output={0}'.format(jsonFileName), WithProperties('--%(configuration)s')]
- def doStepIf(self, step):
- return self.getProperty('patchFailedTests')
+ def evaluateCommand(self, cmd):
+ return shell.Test.evaluateCommand(self, cmd)
- def hideStepIf(self, results, step):
- return not self.doStepIf(step)
-
class CleanBuild(shell.Compile):
name = 'delete-WebKitBuild-directory'
description = ['deleting WebKitBuild directory']
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py (250349 => 250350)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-09-25 17:14:14 UTC (rev 250349)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-09-25 18:35:11 UTC (rev 250350)
@@ -911,7 +911,6 @@
self.setupStep(CompileJSCToT())
self.setProperty('fullPlatform', 'jsc-only')
self.setProperty('configuration', 'debug')
- self.setProperty('patchFailedToBuild', 'True')
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
logEnviron=False,
@@ -923,15 +922,7 @@
self.expectOutcome(result=FAILURE, state_string='Compiled JSC (failure)')
return self.runStep()
- def test_skip(self):
- self.setupStep(CompileJSCToT())
- self.setProperty('fullPlatform', 'jsc-only')
- self.setProperty('configuration', 'debug')
- self.expectHidden(True)
- self.expectOutcome(result=SKIPPED, state_string='Compiled JSC (skipped)')
- return self.runStep()
-
class TestRunJavaScriptCoreTests(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True
@@ -952,7 +943,7 @@
)
+ 0,
)
- self.expectOutcome(result=SUCCESS, state_string='jscore-tests')
+ self.expectOutcome(result=SUCCESS, state_string='Passed JSC tests')
return self.runStep()
def test_failure(self):
@@ -984,7 +975,6 @@
self.setupStep(ReRunJavaScriptCoreTests())
self.setProperty('fullPlatform', 'jsc-only')
self.setProperty('configuration', 'release')
- self.setProperty('patchFailedTests', 'True')
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
command=['perl', 'Tools/Scripts/run-_javascript_core-tests', '--no-build', '--no-fail-fast', '--json-output={0}'.format(self.jsonFileName), '--release'],
@@ -992,7 +982,7 @@
)
+ 0,
)
- self.expectOutcome(result=SUCCESS, state_string='jscore-tests')
+ self.expectOutcome(result=SUCCESS, state_string='Passed JSC tests')
return self.runStep()
def test_failure(self):
@@ -999,7 +989,6 @@
self.setupStep(ReRunJavaScriptCoreTests())
self.setProperty('fullPlatform', 'jsc-only')
self.setProperty('configuration', 'debug')
- self.setProperty('patchFailedTests', 'True')
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
command=['perl', 'Tools/Scripts/run-_javascript_core-tests', '--no-build', '--no-fail-fast', '--json-output={0}'.format(self.jsonFileName), '--debug'],
@@ -1011,15 +1000,7 @@
self.expectOutcome(result=FAILURE, state_string='jscore-tests (failure)')
return self.runStep()
- def test_skip(self):
- self.setupStep(ReRunJavaScriptCoreTests())
- self.setProperty('fullPlatform', 'jsc-only')
- self.setProperty('configuration', 'debug')
- self.expectHidden(True)
- self.expectOutcome(result=SKIPPED, state_string='jscore-tests (skipped)')
- return self.runStep()
-
class TestRunJavaScriptCoreTestsToT(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True
@@ -1033,7 +1014,6 @@
self.setupStep(RunJavaScriptCoreTestsToT())
self.setProperty('fullPlatform', 'jsc-only')
self.setProperty('configuration', 'release')
- self.setProperty('patchFailedTests', 'True')
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
command=['perl', 'Tools/Scripts/run-_javascript_core-tests', '--no-fail-fast', '--json-output={0}'.format(self.jsonFileName), '--release'],
@@ -1048,7 +1028,6 @@
self.setupStep(RunJavaScriptCoreTestsToT())
self.setProperty('fullPlatform', 'jsc-only')
self.setProperty('configuration', 'debug')
- self.setProperty('patchFailedTests', 'True')
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
command=['perl', 'Tools/Scripts/run-_javascript_core-tests', '--no-fail-fast', '--json-output={0}'.format(self.jsonFileName), '--debug'],
@@ -1060,15 +1039,7 @@
self.expectOutcome(result=FAILURE, state_string='jscore-tests (failure)')
return self.runStep()
- def test_skip(self):
- self.setupStep(RunJavaScriptCoreTestsToT())
- self.setProperty('fullPlatform', 'jsc-only')
- self.setProperty('configuration', 'debug')
- self.expectHidden(True)
- self.expectOutcome(result=SKIPPED, state_string='jscore-tests (skipped)')
- return self.runStep()
-
class TestRunWebKitTests(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True
Modified: trunk/Tools/ChangeLog (250349 => 250350)
--- trunk/Tools/ChangeLog 2019-09-25 17:14:14 UTC (rev 250349)
+++ trunk/Tools/ChangeLog 2019-09-25 18:35:11 UTC (rev 250350)
@@ -1,3 +1,23 @@
+2019-09-25 Aakash Jain <[email protected]>
+
+ [EWS] JSC queues should dynamically add required build steps for re-testing the patch
+ https://bugs.webkit.org/show_bug.cgi?id=202170
+
+ Reviewed by Jonathan Bedard.
+
+ * BuildSlaveSupport/ews-build/factories.py:
+ (JSCTestsFactory.__init__): Do not add ReRunJavaScriptCoreTests and related steps here, as
+ these are dynamically added (if required) in steps.py.
+ * BuildSlaveSupport/ews-build/steps.py:
+ (CompileJSCToT): Remove doStepIf() and hideStepIf() method, these are no longer required as we add
+ this step dynamically only if required. We don't need an extra property ('patchFailedToBuild') to be set.
+ (RunJavaScriptCoreTests.evaluateCommand): Dynamically add ReRunJavaScriptCoreTests step if required.
+ (ReRunJavaScriptCoreTests): Removed doStepIf() and hideStepIf() method.
+ (ReRunJavaScriptCoreTests.evaluateCommand): Dynamically add UnApplyPatchIfRequired(), CompileJSCToT() and RunJavaScriptCoreTestsToT steps.
+ (RunJavaScriptCoreTestsToT.evaluateCommand): Overriden to avoid caling the base-class method which dynamically adds
+ more steps.
+ * BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests accordingly.
+
2019-09-25 Wenson Hsieh <[email protected]>
[iPadOS] [DataActivation] Focus moves away after focusing input fields on www.att.com