Title: [259718] trunk/Tools
Revision
259718
Author
[email protected]
Date
2020-04-08 08:41:59 -0700 (Wed, 08 Apr 2020)

Log Message

EWS should skip mac-wk1 and mac-debug-wk1 tests for patches that only change WebKit2 sources
https://bugs.webkit.org/show_bug.cgi?id=210115

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/factories.py:
(macOSWK1Factory.__init__): Set checkRelevance to True for mac wk1 queue.
* BuildSlaveSupport/ews-build/steps.py:
(CheckPatchRelevance): Added relevance info for wk1 queues.
* BuildSlaveSupport/ews-build/factories_unittest.py: Updated unit-tests.
(TestLayoutTestsFactory.test_macos_wk1_release_factory):
(TestLayoutTestsFactory.test_macos_wk1_debug_factory):
* BuildSlaveSupport/ews-build/steps_unittest.py:
(TestCheckPatchRelevance.test_relevant_jsc_patch):
(TestCheckPatchRelevance.test_relevant_wk1_patch):
(TestCheckPatchRelevance.test_queues_without_relevance_info):
(TestCheckPatchRelevance.test_non_relevant_patch):

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/ews-build/factories.py	2020-04-08 15:37:53 UTC (rev 259717)
+++ trunk/Tools/BuildSlaveSupport/ews-build/factories.py	2020-04-08 15:41:59 UTC (rev 259718)
@@ -111,8 +111,8 @@
         self.addStep(DownloadBuiltProduct())
         self.addStep(ExtractBuiltProduct())
 
-    def __init__(self, platform, configuration=None, architectures=None, additionalArguments=None, **kwargs):
-        Factory.__init__(self, platform=platform, configuration=configuration, architectures=architectures, buildOnly=False, additionalArguments=additionalArguments)
+    def __init__(self, platform, configuration=None, architectures=None, additionalArguments=None, checkRelevance=False, **kwargs):
+        Factory.__init__(self, platform=platform, configuration=configuration, architectures=architectures, buildOnly=False, additionalArguments=additionalArguments, checkRelevance=checkRelevance)
         if platform == 'gtk':
             self.addStep(InstallGtkDependencies())
         self.getProduct()
@@ -152,7 +152,10 @@
 class macOSWK1Factory(TestFactory):
     LayoutTestClass = RunWebKit1Tests
 
+    def __init__(self, platform, configuration=None, architectures=None, additionalArguments=None, checkRelevance=False, **kwargs):
+        super(macOSWK1Factory, self).__init__(platform=platform, configuration=configuration, architectures=architectures, additionalArguments=additionalArguments, checkRelevance=True, **kwargs)
 
+
 class macOSWK2Factory(TestFactory):
     LayoutTestClass = RunWebKitTests
 

Modified: trunk/Tools/BuildSlaveSupport/ews-build/factories_unittest.py (259717 => 259718)


--- trunk/Tools/BuildSlaveSupport/ews-build/factories_unittest.py	2020-04-08 15:37:53 UTC (rev 259717)
+++ trunk/Tools/BuildSlaveSupport/ews-build/factories_unittest.py	2020-04-08 15:41:59 UTC (rev 259718)
@@ -208,6 +208,7 @@
         factory = factories.macOSWK1Factory(platform='mac-mojave', configuration='release', architectures=["x86_64"])
         self.assertBuildSteps(factory.steps, [
             _BuildStepFactory(steps.ConfigureBuild, platform='mac-mojave', configuration='release', architectures=["x86_64"], buildOnly=False, triggers=None, remotes=None, additionalArguments=None),
+            _BuildStepFactory(steps.CheckPatchRelevance),
             _BuildStepFactory(steps.ValidatePatch),
             _BuildStepFactory(steps.PrintConfiguration),
             _BuildStepFactory(steps.CheckOutSource),
@@ -224,6 +225,7 @@
         factory = factories.macOSWK1Factory(platform='mac-mojave', configuration='debug', architectures=["x86_64"])
         self.assertBuildSteps(factory.steps, [
             _BuildStepFactory(steps.ConfigureBuild, platform='mac-mojave', configuration='debug', architectures=["x86_64"], buildOnly=False, triggers=None, remotes=None, additionalArguments=None),
+            _BuildStepFactory(steps.CheckPatchRelevance),
             _BuildStepFactory(steps.ValidatePatch),
             _BuildStepFactory(steps.PrintConfiguration),
             _BuildStepFactory(steps.CheckOutSource),

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2020-04-08 15:37:53 UTC (rev 259717)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2020-04-08 15:41:59 UTC (rev 259718)
@@ -280,6 +280,19 @@
         'Tools/Scripts/webkitdirs.pm',
     ]
 
+    wk1_paths = [
+        'Source/WebKitLegacy',
+        'Source/WebCore',
+        'Source/WebInspectorUI',
+        'Source/WebDriver',
+        'Source/WTF',
+        'Source/bmalloc',
+        'Source/_javascript_Core',
+        'Source/ThirdParty',
+        'LayoutTests',
+        'Tools',
+    ]
+
     webkitpy_paths = [
         'Tools/Scripts/webkitpy/',
         'Tools/QueueStatusServer/',
@@ -290,6 +303,7 @@
         'services-ews': services_paths,
         'jsc': jsc_paths,
         'webkitpy': webkitpy_paths,
+        'wk1-tests': wk1_paths,
     }
 
     def _patch_is_relevant(self, patch, builderName):

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2020-04-08 15:37:53 UTC (rev 259717)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2020-04-08 15:41:59 UTC (rev 259718)
@@ -2159,7 +2159,7 @@
     def tearDown(self):
         return self.tearDownBuildStep()
 
-    def test_relevant_patch(self):
+    def test_relevant_jsc_patch(self):
         CheckPatchRelevance._get_patch = lambda x: 'Sample patch; file: JSTests/'
         self.setupStep(CheckPatchRelevance())
         self.setProperty('buildername', 'JSC-Tests-EWS')
@@ -2168,20 +2168,30 @@
         self.expectOutcome(result=SUCCESS, state_string='Patch contains relevant changes')
         return self.runStep()
 
-    def test_queue_without_relevance_info(self):
-        CheckPatchRelevance._get_patch = lambda x: 'Sample patch'
+    def test_relevant_wk1_patch(self):
+        CheckPatchRelevance._get_patch = lambda x: 'Sample patch; file: Source/WebKitLegacy'
         self.setupStep(CheckPatchRelevance())
-        self.setProperty('buildername', 'Commit-Queue')
-        CheckPatchStatusOnEWSQueues.get_patch_status = lambda cls, patch_id, queue: FAILURE
+        self.setProperty('buildername', 'macOS-Mojave-Release-WK1-Tests-EWS')
         self.expectOutcome(result=SUCCESS, state_string='Patch contains relevant changes')
         return self.runStep()
 
+    def test_queues_without_relevance_info(self):
+        CheckPatchRelevance._get_patch = lambda x: 'Sample patch'
+        queues = ['Commit-Queue', 'Style-EWS', 'Apply-WatchList-EWS', 'GTK-Build-EWS', 'GTK-WK2-Tests-EWS',
+                  'iOS-13-Build-EWS', 'iOS-13-Simulator-Build-EWS', 'iOS-13-Simulator-WK2-Tests-EWS',
+                  'macOS-Mojave-Release-Build-EWS', 'macOS-Mojave-Release-WK2-Tests-EWS', 'macOS-Mojave-Debug-Build-EWS',
+                  'Windows-EWS', 'WinCairo-EWS', 'WPE-EWS', 'WebKitPerl-Tests-EWS']
+        for queue in queues:
+            self.setupStep(CheckPatchRelevance())
+            self.setProperty('buildername', queue)
+            self.expectOutcome(result=SUCCESS, state_string='Patch contains relevant changes')
+        return self.runStep()
+
     def test_non_relevant_patch(self):
         CheckPatchRelevance._get_patch = lambda x: 'Sample patch'
         self.setupStep(CheckPatchRelevance())
         self.setProperty('buildername', 'JSC-Tests-EWS')
         self.setProperty('patch_id', '1234')
-        CheckPatchStatusOnEWSQueues.get_patch_status = lambda cls, patch_id, queue: FAILURE
         self.expectOutcome(result=FAILURE, state_string='Patch doesn\'t contain relevant changes')
         return self.runStep()
 

Modified: trunk/Tools/ChangeLog (259717 => 259718)


--- trunk/Tools/ChangeLog	2020-04-08 15:37:53 UTC (rev 259717)
+++ trunk/Tools/ChangeLog	2020-04-08 15:41:59 UTC (rev 259718)
@@ -1,3 +1,23 @@
+2020-04-08  Aakash Jain  <[email protected]>
+
+        EWS should skip mac-wk1 and mac-debug-wk1 tests for patches that only change WebKit2 sources
+        https://bugs.webkit.org/show_bug.cgi?id=210115
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/factories.py:
+        (macOSWK1Factory.__init__): Set checkRelevance to True for mac wk1 queue.
+        * BuildSlaveSupport/ews-build/steps.py:
+        (CheckPatchRelevance): Added relevance info for wk1 queues.
+        * BuildSlaveSupport/ews-build/factories_unittest.py: Updated unit-tests.
+        (TestLayoutTestsFactory.test_macos_wk1_release_factory): 
+        (TestLayoutTestsFactory.test_macos_wk1_debug_factory):
+        * BuildSlaveSupport/ews-build/steps_unittest.py:
+        (TestCheckPatchRelevance.test_relevant_jsc_patch):
+        (TestCheckPatchRelevance.test_relevant_wk1_patch):
+        (TestCheckPatchRelevance.test_queues_without_relevance_info):
+        (TestCheckPatchRelevance.test_non_relevant_patch):
+
 2020-04-08  Claudio Saavedra  <[email protected]>
 
         [GTK] Drop usage of deprecated GdkDeviceManager
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to