Title: [277884] trunk/Tools
Revision
277884
Author
[email protected]
Date
2021-05-21 13:58:01 -0700 (Fri, 21 May 2021)

Log Message

Run layout tests in stress mode for 10 iterations on regular EWS layout-test queues
https://bugs.webkit.org/show_bug.cgi?id=226097

Reviewed by Jonathan Bedard.

* CISupport/ews-build/factories.py:
* CISupport/ews-build/factories_unittest.py:
* CISupport/ews-build/steps.py:
(AnalyzePatch.getResultSummary):
(FindModifiedLayoutTests.__init__):
(FindModifiedLayoutTests.start):
(RunWebKitTestsInStressMode):
(RunWebKitTestsInStressMode.__init__):
(RunWebKitTestsInStressMode.setLayoutTestCommand):
(RunWebKitTestsInStressMode.doStepIf):
* CISupport/ews-build/steps_unittest.py:

Modified Paths

Diff

Modified: trunk/Tools/CISupport/ews-build/factories.py (277883 => 277884)


--- trunk/Tools/CISupport/ews-build/factories.py	2021-05-21 20:48:34 UTC (rev 277883)
+++ trunk/Tools/CISupport/ews-build/factories.py	2021-05-21 20:58:01 UTC (rev 277884)
@@ -134,6 +134,8 @@
             self.addStep(WaitForCrashCollection())
         self.addStep(KillOldProcesses())
         if self.LayoutTestClass:
+            self.addStep(FindModifiedLayoutTests(skipBuildIfNoResult=False))
+            self.addStep(RunWebKitTestsInStressMode(num_iterations=10))
             self.addStep(self.LayoutTestClass())
         if self.APITestClass:
             self.addStep(self.APITestClass())

Modified: trunk/Tools/CISupport/ews-build/factories_unittest.py (277883 => 277884)


--- trunk/Tools/CISupport/ews-build/factories_unittest.py	2021-05-21 20:48:34 UTC (rev 277883)
+++ trunk/Tools/CISupport/ews-build/factories_unittest.py	2021-05-21 20:58:01 UTC (rev 277884)
@@ -456,6 +456,8 @@
             _BuildStepFactory(steps.ExtractBuiltProduct),
             _BuildStepFactory(steps.WaitForCrashCollection),
             _BuildStepFactory(steps.KillOldProcesses),
+            _BuildStepFactory(steps.FindModifiedLayoutTests, skipBuildIfNoResult=False),
+            _BuildStepFactory(steps.RunWebKitTestsInStressMode, num_iterations=10),
             _BuildStepFactory(steps.RunWebKit1Tests),
             _BuildStepFactory(steps.TriggerCrashLogSubmission),
             _BuildStepFactory(steps.SetBuildSummary),
@@ -478,6 +480,8 @@
             _BuildStepFactory(steps.ExtractBuiltProduct),
             _BuildStepFactory(steps.WaitForCrashCollection),
             _BuildStepFactory(steps.KillOldProcesses),
+            _BuildStepFactory(steps.FindModifiedLayoutTests, skipBuildIfNoResult=False),
+            _BuildStepFactory(steps.RunWebKitTestsInStressMode, num_iterations=10),
             _BuildStepFactory(steps.RunWebKit1Tests),
             _BuildStepFactory(steps.TriggerCrashLogSubmission),
             _BuildStepFactory(steps.SetBuildSummary),
@@ -499,6 +503,8 @@
             _BuildStepFactory(steps.ExtractBuiltProduct),
             _BuildStepFactory(steps.WaitForCrashCollection),
             _BuildStepFactory(steps.KillOldProcesses),
+            _BuildStepFactory(steps.FindModifiedLayoutTests, skipBuildIfNoResult=False),
+            _BuildStepFactory(steps.RunWebKitTestsInStressMode, num_iterations=10),
             _BuildStepFactory(steps.RunWebKitTests),
             _BuildStepFactory(steps.TriggerCrashLogSubmission),
             _BuildStepFactory(steps.SetBuildSummary),
@@ -520,6 +526,8 @@
             _BuildStepFactory(steps.ExtractBuiltProduct),
             _BuildStepFactory(steps.WaitForCrashCollection),
             _BuildStepFactory(steps.KillOldProcesses),
+            _BuildStepFactory(steps.FindModifiedLayoutTests, skipBuildIfNoResult=False),
+            _BuildStepFactory(steps.RunWebKitTestsInStressMode, num_iterations=10),
             _BuildStepFactory(steps.RunWebKitTests),
             _BuildStepFactory(steps.TriggerCrashLogSubmission),
             _BuildStepFactory(steps.SetBuildSummary),
@@ -541,6 +549,8 @@
             _BuildStepFactory(steps.DownloadBuiltProduct),
             _BuildStepFactory(steps.ExtractBuiltProduct),
             _BuildStepFactory(steps.KillOldProcesses),
+            _BuildStepFactory(steps.FindModifiedLayoutTests, skipBuildIfNoResult=False),
+            _BuildStepFactory(steps.RunWebKitTestsInStressMode, num_iterations=10),
             _BuildStepFactory(steps.RunWebKitTests),
             _BuildStepFactory(steps.SetBuildSummary),
         ])

Modified: trunk/Tools/CISupport/ews-build/steps.py (277883 => 277884)


--- trunk/Tools/CISupport/ews-build/steps.py	2021-05-21 20:48:34 UTC (rev 277883)
+++ trunk/Tools/CISupport/ews-build/steps.py	2021-05-21 20:58:01 UTC (rev 277884)
@@ -369,7 +369,7 @@
         log.addStdout(message)
 
     def getResultSummary(self):
-        if self.results == FAILURE:
+        if self.results in [FAILURE, SKIPPED]:
             return {'step': 'Patch doesn\'t have relevant changes'}
         if self.results == SUCCESS:
             return {'step': 'Patch contains relevant changes'}
@@ -483,6 +483,10 @@
     DIRECTORIES_TO_IGNORE = ['reference', 'reftest', 'resources', 'support', 'script-tests', 'tools']
     SUFFIXES_TO_IGNORE = ['-expected', '-expected-mismatch', '-ref', '-notref']
 
+    def __init__(self, skipBuildIfNoResult=True):
+        self.skipBuildIfNoResult = skipBuildIfNoResult
+        buildstep.BuildStep.__init__(self)
+
     def find_test_names_from_patch(self, patch):
         tests = []
         for line in patch.splitlines():
@@ -511,9 +515,10 @@
             return None
 
         self._addToLog('stdio', 'This patch does not modify any layout tests')
-        self.finished(FAILURE)
-        self.build.results = SKIPPED
-        self.build.buildFinished(['Patch {} doesn\'t have relevant changes'.format(self.getProperty('patch_id', ''))], SKIPPED)
+        self.finished(SKIPPED)
+        if self.skipBuildIfNoResult:
+            self.build.results = SKIPPED
+            self.build.buildFinished(['Patch {} doesn\'t have relevant changes'.format(self.getProperty('patch_id', ''))], SKIPPED)
         return None
 
 
@@ -2288,12 +2293,15 @@
     name = 'run-layout-tests-in-stress-mode'
     suffix = 'stress-mode'
     EXIT_AFTER_FAILURES = '10'
-    NUM_ITERATIONS = 100
 
+    def __init__(self, num_iterations=100):
+        self.num_iterations = num_iterations
+        super(RunWebKitTestsInStressMode, self).__init__()
+
     def setLayoutTestCommand(self):
         RunWebKitTests.setLayoutTestCommand(self)
 
-        self.setCommand(self.command + ['--iterations', self.NUM_ITERATIONS])
+        self.setCommand(self.command + ['--iterations', self.num_iterations])
         modified_tests = self.getProperty('modified_tests')
         if modified_tests:
             self.setCommand(self.command + modified_tests)
@@ -2314,7 +2322,10 @@
             ])
         return rc
 
+    def doStepIf(self, step):
+        return self.getProperty('modified_tests', False)
 
+
 class RunWebKitTestsInStressGuardmallocMode(RunWebKitTestsInStressMode):
     name = 'run-layout-tests-in-guard-malloc-stress-mode'
     suffix = 'guard-malloc'

Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (277883 => 277884)


--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-05-21 20:48:34 UTC (rev 277883)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-05-21 20:58:01 UTC (rev 277884)
@@ -1934,6 +1934,7 @@
         self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
+        self.setProperty('modified_tests', ['test1', 'test2'])
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         logfiles={'json': self.jsonFileName},
@@ -1943,7 +1944,7 @@
                                  '--no-build', '--no-show-results', '--no-new-test-results', '--clobber-old-results',
                                  '--release', '--results-directory', 'layout-test-results', '--debug-rwt-logging',
                                  '--exit-after-n-failures', '10', '--skip-failing-tests',
-                                 '--iterations', 100],
+                                 '--iterations', 100, 'test1', 'test2'],
                         )
             + 0,
         )
@@ -1954,6 +1955,7 @@
         self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
+        self.setProperty('modified_tests', ['test'])
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         logfiles={'json': self.jsonFileName},
@@ -1963,7 +1965,7 @@
                                  '--no-build', '--no-show-results', '--no-new-test-results', '--clobber-old-results',
                                  '--release', '--results-directory', 'layout-test-results', '--debug-rwt-logging',
                                  '--exit-after-n-failures', '10', '--skip-failing-tests',
-                                 '--iterations', 100],
+                                 '--iterations', 100, 'test'],
                         )
             + ExpectShell.log('stdio', stdout='9 failures found.')
             + 2,
@@ -1992,6 +1994,7 @@
         self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
+        self.setProperty('modified_tests', ['test1', 'test2'])
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         logfiles={'json': self.jsonFileName},
@@ -2001,7 +2004,7 @@
                                  '--no-build', '--no-show-results', '--no-new-test-results', '--clobber-old-results',
                                  '--release', '--results-directory', 'layout-test-results', '--debug-rwt-logging',
                                  '--exit-after-n-failures', '10', '--skip-failing-tests', '--guard-malloc',
-                                 '--iterations', 100],
+                                 '--iterations', 100, 'test1', 'test2'],
                         )
             + 0,
         )
@@ -2012,6 +2015,7 @@
         self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
+        self.setProperty('modified_tests', ['test'])
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         logfiles={'json': self.jsonFileName},
@@ -2021,7 +2025,7 @@
                                  '--no-build', '--no-show-results', '--no-new-test-results', '--clobber-old-results',
                                  '--release', '--results-directory', 'layout-test-results', '--debug-rwt-logging',
                                  '--exit-after-n-failures', '10', '--skip-failing-tests', '--guard-malloc',
-                                 '--iterations', 100],
+                                 '--iterations', 100, 'test'],
                         )
             + ExpectShell.log('stdio', stdout='9 failures found.')
             + 2,
@@ -2822,7 +2826,7 @@
         dir_names = ['reference', 'reftest', 'resources', 'support', 'script-tests', 'tools']
         for dir_name in dir_names:
             FindModifiedLayoutTests._get_patch = lambda x: '+++ LayoutTests/{}/test-name.html'.format(dir_name).encode('utf-8')
-            self.expectOutcome(result=FAILURE, state_string='Patch doesn\'t have relevant changes')
+            self.expectOutcome(result=SKIPPED, state_string='Patch doesn\'t have relevant changes')
             rc = self.runStep()
             self.assertEqual(self.getProperty('modified_tests'), None)
         return rc
@@ -2832,7 +2836,7 @@
         suffixes = ['-expected', '-expected-mismatch', '-ref', '-notref']
         for suffix in suffixes:
             FindModifiedLayoutTests._get_patch = lambda x: '+++ LayoutTests/http/tests/events/device-motion-{}.html'.format(suffix).encode('utf-8')
-            self.expectOutcome(result=FAILURE, state_string='Patch doesn\'t have relevant changes')
+            self.expectOutcome(result=SKIPPED, state_string='Patch doesn\'t have relevant changes')
             rc = self.runStep()
             self.assertEqual(self.getProperty('modified_tests'), None)
         return rc
@@ -2840,7 +2844,7 @@
     def test_ignore_non_layout_test_in_html_directory(self):
         self.setupStep(FindModifiedLayoutTests())
         FindModifiedLayoutTests._get_patch = lambda x: '+++ LayoutTests/html/test.txt'.encode('utf-8')
-        self.expectOutcome(result=FAILURE, state_string='Patch doesn\'t have relevant changes')
+        self.expectOutcome(result=SKIPPED, state_string='Patch doesn\'t have relevant changes')
         rc = self.runStep()
         self.assertEqual(self.getProperty('modified_tests'), None)
         return rc
@@ -2848,7 +2852,7 @@
     def test_non_relevant_patch(self):
         self.setupStep(FindModifiedLayoutTests())
         FindModifiedLayoutTests._get_patch = lambda x: b'Sample patch which does not modify any layout test'
-        self.expectOutcome(result=FAILURE, state_string='Patch doesn\'t have relevant changes')
+        self.expectOutcome(result=SKIPPED, state_string='Patch doesn\'t have relevant changes')
         rc = self.runStep()
         self.assertEqual(self.getProperty('modified_tests'), None)
         return rc

Modified: trunk/Tools/ChangeLog (277883 => 277884)


--- trunk/Tools/ChangeLog	2021-05-21 20:48:34 UTC (rev 277883)
+++ trunk/Tools/ChangeLog	2021-05-21 20:58:01 UTC (rev 277884)
@@ -1,3 +1,22 @@
+2021-05-21  Aakash Jain  <[email protected]>
+
+        Run layout tests in stress mode for 10 iterations on regular EWS layout-test queues
+        https://bugs.webkit.org/show_bug.cgi?id=226097
+
+        Reviewed by Jonathan Bedard.
+
+        * CISupport/ews-build/factories.py:
+        * CISupport/ews-build/factories_unittest.py:
+        * CISupport/ews-build/steps.py:
+        (AnalyzePatch.getResultSummary):
+        (FindModifiedLayoutTests.__init__):
+        (FindModifiedLayoutTests.start):
+        (RunWebKitTestsInStressMode):
+        (RunWebKitTestsInStressMode.__init__):
+        (RunWebKitTestsInStressMode.setLayoutTestCommand):
+        (RunWebKitTestsInStressMode.doStepIf):
+        * CISupport/ews-build/steps_unittest.py:
+
 2021-05-21  Eric Carlson  <[email protected]>
 
         [Cocoa] Update AudioSession buffer size handling
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to