Title: [249100] trunk/Tools
Revision
249100
Author
[email protected]
Date
2019-08-26 10:08:21 -0700 (Mon, 26 Aug 2019)

Log Message

[ews] Add EWS queue for applying watchlist
https://bugs.webkit.org/show_bug.cgi?id=201072

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(ApplyWatchList): Build step to apply watchlist.
(ApplyWatchList.__init__): Set logEnviron to False.
(ApplyWatchList.getResultSummary): Updated the description in case of failure.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
* BuildSlaveSupport/ews-build/factories.py:
(WatchListFactory): Build factory for WatchList.
* BuildSlaveSupport/ews-build/loadConfig.py:
* BuildSlaveSupport/ews-build/config.json:

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/ews-build/config.json (249099 => 249100)


--- trunk/Tools/BuildSlaveSupport/ews-build/config.json	2019-08-26 16:57:16 UTC (rev 249099)
+++ trunk/Tools/BuildSlaveSupport/ews-build/config.json	2019-08-26 17:08:21 UTC (rev 249100)
@@ -287,6 +287,13 @@
       "workernames": ["ews151"]
     },
     {
+      "name": "Apply-WatchList-EWS",
+      "shortname": "watchlist",
+      "factory": "WatchListFactory",
+      "platform": "*",
+      "workernames": ["webkit-misc"]
+    },
+    {
       "name": "GTK-Webkit2-EWS",
       "shortname": "gtk",
       "factory": "GTKFactory",
@@ -453,7 +460,7 @@
       "type": "Try_Userpass",
       "name": "try",
       "port": 5555,
-      "builderNames": ["Bindings-Tests-EWS", "GTK-Webkit2-EWS", "iOS-12-Build-EWS", "iOS-12-Simulator-Build-EWS",
+      "builderNames": ["Apply-WatchList-EWS", "Bindings-Tests-EWS", "GTK-Webkit2-EWS", "iOS-12-Build-EWS", "iOS-12-Simulator-Build-EWS",
                        "macOS-High-Sierra-Debug-Build-EWS", "macOS-High-Sierra-Release-Build-EWS",
                        "Services-EWS", "Style-EWS", "WebKitPerl-Tests-EWS", "WebKitPy-Tests-EWS", "WPE-EWS", "WinCairo-EWS"]
     },

Modified: trunk/Tools/BuildSlaveSupport/ews-build/factories.py (249099 => 249100)


--- trunk/Tools/BuildSlaveSupport/ews-build/factories.py	2019-08-26 16:57:16 UTC (rev 249099)
+++ trunk/Tools/BuildSlaveSupport/ews-build/factories.py	2019-08-26 17:08:21 UTC (rev 249100)
@@ -24,7 +24,7 @@
 from buildbot.process import factory
 from buildbot.steps import trigger
 
-from steps import (ApplyPatch, CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance,
+from steps import (ApplyPatch, ApplyWatchList, CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance,
                    CheckStyle, CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, ConfigureBuild,
                    DownloadBuiltProduct, ExtractBuiltProduct, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
                    PrintConfiguration, ReRunJavaScriptCoreTests, RunAPITests, RunBindingsTests, RunEWSBuildbotCheckConfig, RunEWSUnitTests,
@@ -175,3 +175,9 @@
         Factory.__init__(self, platform, configuration, architectures, False, additionalArguments, checkRelevance=True)
         self.addStep(RunEWSUnitTests())
         self.addStep(RunEWSBuildbotCheckConfig())
+
+
+class WatchListFactory(Factory):
+    def __init__(self, platform, configuration=None, architectures=None, triggers=None, additionalArguments=None, **kwargs):
+        Factory.__init__(self, platform, configuration, architectures, False, triggers, additionalArguments)
+        self.addStep(ApplyWatchList())

Modified: trunk/Tools/BuildSlaveSupport/ews-build/loadConfig.py (249099 => 249100)


--- trunk/Tools/BuildSlaveSupport/ews-build/loadConfig.py	2019-08-26 16:57:16 UTC (rev 249099)
+++ trunk/Tools/BuildSlaveSupport/ews-build/loadConfig.py	2019-08-26 17:08:21 UTC (rev 249100)
@@ -33,7 +33,7 @@
 from factories import (APITestsFactory, BindingsFactory, BuildFactory, Factory, GTKFactory,
                        JSCTestsFactory, StyleFactory, TestFactory, WPEFactory, WebKitPerlFactory,
                        WebKitPyFactory, WinCairoFactory, WindowsFactory, iOSBuildFactory, iOSTestsFactory,
-                       macOSBuildFactory, macOSWK1Factory, macOSWK2Factory, ServicesFactory)
+                       macOSBuildFactory, macOSWK1Factory, macOSWK2Factory, ServicesFactory, WatchListFactory)
 
 BUILDER_NAME_LENGTH_LIMIT = 70
 STEP_NAME_LENGTH_LIMIT = 50

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2019-08-26 16:57:16 UTC (rev 249099)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2019-08-26 17:08:21 UTC (rev 249100)
@@ -1580,3 +1580,21 @@
             xcode_version = match.group(1).strip()
             configuration += u', Xcode: {}'.format(xcode_version)
         return {u'step': configuration}
+
+
+class ApplyWatchList(shell.ShellCommand):
+    name = 'apply-watch-list'
+    description = ['applying watchilist']
+    descriptionDone = ['Applied WatchList']
+    bug_id = WithProperties('%(bug_id)s')
+    command = ['python', 'Tools/Scripts/webkit-patch', 'apply-watchlist-local', bug_id]
+    haltOnFailure = True
+    flunkOnFailure = True
+
+    def __init__(self, **kwargs):
+        shell.ShellCommand.__init__(self, timeout=2 * 60, logEnviron=False, **kwargs)
+
+    def getResultSummary(self):
+        if self.results != SUCCESS:
+            return {u'step': u'Failed to apply watchlist'}
+        return super(ApplyWatchList, self).getResultSummary()

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2019-08-26 16:57:16 UTC (rev 249099)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2019-08-26 17:08:21 UTC (rev 249100)
@@ -34,7 +34,7 @@
 from twisted.python import failure, log
 from twisted.trial import unittest
 
-from steps import (AnalyzeAPITestsResults, AnalyzeCompileWebKitResults, AnalyzeLayoutTestsResults, ApplyPatch, ArchiveBuiltProduct, ArchiveTestResults,
+from steps import (AnalyzeAPITestsResults, AnalyzeCompileWebKitResults, AnalyzeLayoutTestsResults, ApplyPatch, ApplyWatchList, ArchiveBuiltProduct, ArchiveTestResults,
                    CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, CheckStyle, CleanBuild, CleanUpGitIndexLock, CleanWorkingDirectory,
                    CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, CompileWebKitToT, ConfigureBuild,
                    DownloadBuiltProduct, ExtractBuiltProduct, ExtractTestResults, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
@@ -296,6 +296,43 @@
         return self.runStep()
 
 
+class TestApplyWatchList(BuildStepMixinAdditions, unittest.TestCase):
+    def setUp(self):
+        self.longMessage = True
+        return self.setUpBuildStep()
+
+    def tearDown(self):
+        return self.tearDownBuildStep()
+
+    def test_success(self):
+        self.setupStep(ApplyWatchList())
+        self.setProperty('bug_id', '1234')
+        self.expectRemoteCommands(
+            ExpectShell(workdir='wkdir',
+                        timeout=120,
+                        logEnviron=False,
+                        command=['python', 'Tools/Scripts/webkit-patch', 'apply-watchlist-local', '1234'])
+            + ExpectShell.log('stdio', stdout='Result of watchlist: cc "" messages ""')
+            + 0,
+        )
+        self.expectOutcome(result=SUCCESS, state_string='Applied WatchList')
+        return self.runStep()
+
+    def test_failure(self):
+        self.setupStep(ApplyWatchList())
+        self.setProperty('bug_id', '1234')
+        self.expectRemoteCommands(
+            ExpectShell(workdir='wkdir',
+                        timeout=120,
+                        logEnviron=False,
+                        command=['python', 'Tools/Scripts/webkit-patch', 'apply-watchlist-local', '1234'])
+            + ExpectShell.log('stdio', stdout='Unexpected failure')
+            + 2,
+        )
+        self.expectOutcome(result=FAILURE, state_string='Failed to apply watchlist')
+        return self.runStep()
+
+
 class TestRunBindingsTests(BuildStepMixinAdditions, unittest.TestCase):
     def setUp(self):
         self.longMessage = True

Modified: trunk/Tools/ChangeLog (249099 => 249100)


--- trunk/Tools/ChangeLog	2019-08-26 16:57:16 UTC (rev 249099)
+++ trunk/Tools/ChangeLog	2019-08-26 17:08:21 UTC (rev 249100)
@@ -1,3 +1,20 @@
+2019-08-26  Aakash Jain  <[email protected]>
+
+        [ews] Add EWS queue for applying watchlist
+        https://bugs.webkit.org/show_bug.cgi?id=201072
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (ApplyWatchList): Build step to apply watchlist.
+        (ApplyWatchList.__init__): Set logEnviron to False.
+        (ApplyWatchList.getResultSummary): Updated the description in case of failure.
+        * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
+        * BuildSlaveSupport/ews-build/factories.py:
+        (WatchListFactory): Build factory for WatchList.
+        * BuildSlaveSupport/ews-build/loadConfig.py:
+        * BuildSlaveSupport/ews-build/config.json:
+
 2019-08-26  Youenn Fablet  <[email protected]>
 
         Add a WebsiteDataStore delegate to handle AuthenticationChallenge that do not come from pages
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to