Modified: trunk/Tools/BuildSlaveSupport/ews-build/factories.py (247870 => 247871)
--- trunk/Tools/BuildSlaveSupport/ews-build/factories.py 2019-07-26 19:19:36 UTC (rev 247870)
+++ trunk/Tools/BuildSlaveSupport/ews-build/factories.py 2019-07-26 19:22:02 UTC (rev 247871)
@@ -29,7 +29,7 @@
DownloadBuiltProduct, ExtractBuiltProduct, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
PrintConfiguration, ReRunJavaScriptCoreTests, RunAPITests, RunBindingsTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests,
RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests, RunWebKitPerlTests,
- RunWebKitPyTests, RunWebKitTests, UnApplyPatchIfRequired, ValidatePatch)
+ RunWebKitPyTests, RunWebKitTests, UnApplyPatchIfRequired, UpdateWorkingDirectory, ValidatePatch)
class Factory(factory.BuildFactory):
@@ -48,9 +48,15 @@
self.addStep(ApplyPatch())
-class StyleFactory(Factory):
- def __init__(self, platform, configuration=None, architectures=None, additionalArguments=None, **kwargs):
- Factory.__init__(self, platform, configuration, architectures, False, additionalArguments)
+class StyleFactory(factory.BuildFactory):
+ def __init__(self, platform, configuration=None, architectures=None, triggers=None, additionalArguments=None, **kwargs):
+ factory.BuildFactory.__init__(self)
+ self.addStep(ConfigureBuild(platform, configuration, architectures, False, triggers, additionalArguments))
+ self.addStep(ValidatePatch())
+ self.addStep(PrintConfiguration())
+ self.addStep(CheckOutSource())
+ self.addStep(UpdateWorkingDirectory())
+ self.addStep(ApplyPatch())
self.addStep(CheckStyle())
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps.py (247870 => 247871)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-07-26 19:19:36 UTC (rev 247870)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py 2019-07-26 19:22:02 UTC (rev 247871)
@@ -159,6 +159,18 @@
super(CleanWorkingDirectory, self).__init__(logEnviron=False, **kwargs)
+class UpdateWorkingDirectory(shell.ShellCommand):
+ name = 'update-working-directory'
+ description = ['update-workring-directory running']
+ descriptionDone = ['Updated working directory']
+ flunkOnFailure = True
+ haltOnFailure = True
+ command = ['perl', 'Tools/Scripts/update-webkit']
+
+ def __init__(self, **kwargs):
+ super(UpdateWorkingDirectory, self).__init__(logEnviron=False, **kwargs)
+
+
class ApplyPatch(shell.ShellCommand, CompositeStepMixin):
name = 'apply-patch'
description = ['applying-patch']
@@ -505,6 +517,9 @@
failedTestsFormatString = '%d style error%s'
command = ['python', 'Tools/Scripts/check-webkit-style']
+ def __init__(self, **kwargs):
+ super(CheckStyle, self).__init__(logEnviron=False, **kwargs)
+
def countFailures(self, cmd):
log_text = self.log_observer.getStdout() + self.log_observer.getStderr()
Modified: trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py (247870 => 247871)
--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-07-26 19:19:36 UTC (rev 247870)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py 2019-07-26 19:22:02 UTC (rev 247871)
@@ -41,7 +41,7 @@
PrintConfiguration, ReRunAPITests, ReRunJavaScriptCoreTests, ReRunWebKitTests, RunAPITests, RunAPITestsWithoutPatch,
RunBindingsTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests, RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests,
RunWebKitPerlTests, RunWebKitPyTests, RunWebKitTests, TestWithFailureCount, Trigger, TransferToS3, UnApplyPatchIfRequired,
- UploadBuiltProduct, UploadTestResults, ValidatePatch)
+ UpdateWorkingDirectory, UploadBuiltProduct, UploadTestResults, ValidatePatch)
# Workaround for https://github.com/buildbot/buildbot/issues/4669
from buildbot.test.fake.fakebuild import FakeBuild
@@ -214,6 +214,7 @@
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
+ logEnviron=False,
command=['python', 'Tools/Scripts/check-webkit-style'],
)
+ 0,
@@ -229,6 +230,7 @@
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
+ logEnviron=False,
command=['python', 'Tools/Scripts/check-webkit-style'],
)
+ 2,
@@ -244,6 +246,7 @@
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
+ logEnviron=False,
command=['python', 'Tools/Scripts/check-webkit-style'],
)
+ ExpectShell.log('stdio', stdout='''ERROR: Source/WebCore/layout/FloatingContext.cpp:36: Code inside a namespace should not be indented. [whitespace/indent] [4]
@@ -266,6 +269,7 @@
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
+ logEnviron=False,
command=['python', 'Tools/Scripts/check-webkit-style'],
)
+ ExpectShell.log('stdio', stdout='Total errors found: 0 in 6 files')
@@ -282,6 +286,7 @@
self.expectRemoteCommands(
ExpectShell(workdir='wkdir',
+ logEnviron=False,
command=['python', 'Tools/Scripts/check-webkit-style'],
)
+ ExpectShell.log('stdio', stdout='Total errors found: 0 in 0 files')
@@ -1428,6 +1433,40 @@
return self.runStep()
+class TestUpdateWorkingDirectory(BuildStepMixinAdditions, unittest.TestCase):
+ def setUp(self):
+ self.longMessage = True
+ return self.setUpBuildStep()
+
+ def tearDown(self):
+ return self.tearDownBuildStep()
+
+ def test_success(self):
+ self.setupStep(UpdateWorkingDirectory())
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ command=['perl', 'Tools/Scripts/update-webkit'],
+ )
+ + 0,
+ )
+ self.expectOutcome(result=SUCCESS, state_string='Updated working directory')
+ return self.runStep()
+
+ def test_failure(self):
+ self.setupStep(UpdateWorkingDirectory())
+ self.expectRemoteCommands(
+ ExpectShell(workdir='wkdir',
+ logEnviron=False,
+ command=['perl', 'Tools/Scripts/update-webkit'],
+ )
+ + ExpectShell.log('stdio', stdout='Unexpected failure.')
+ + 2,
+ )
+ self.expectOutcome(result=FAILURE, state_string='Updated working directory (failure)')
+ return self.runStep()
+
+
class TestUnApplyPatchIfRequired(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True