Title: [275287] trunk/Tools
Revision
275287
Author
[email protected]
Date
2021-03-31 10:10:46 -0700 (Wed, 31 Mar 2021)

Log Message

Add build step to run layout tests for multiple iterations in guard malloc mode
https://bugs.webkit.org/show_bug.cgi?id=224002

Reviewed by Jonathan Bedard.

* CISupport/ews-build/steps.py:
(RunWebKitTests):
(RunWebKitTests.setLayoutTestCommand):
(RunWebKitTestsInStressGuardmallocMode):
* CISupport/ews-build/steps_unittest.py:

Modified Paths

Diff

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


--- trunk/Tools/CISupport/ews-build/steps.py	2021-03-31 17:06:21 UTC (rev 275286)
+++ trunk/Tools/CISupport/ews-build/steps.py	2021-03-31 17:10:46 UTC (rev 275287)
@@ -2064,6 +2064,7 @@
     jsonFileName = 'layout-test-results/full_results.json'
     logfiles = {'json': jsonFileName}
     test_failures_log_name = 'test-failures'
+    ENABLE_GUARD_MALLOC = False
     EXIT_AFTER_FAILURES = '30'
     command = ['python', 'Tools/Scripts/run-webkit-tests',
                '--no-build',
@@ -2106,6 +2107,9 @@
         if additionalArguments:
             self.setCommand(self.command + additionalArguments)
 
+        if self.ENABLE_GUARD_MALLOC:
+            self.setCommand(self.command + ['--guard-malloc'])
+
         if self.name == 'run-layout-tests-without-patch':
             # In order to speed up testing, on the step that retries running the layout tests without patch
             # only run the subset of tests that failed on the previous steps.
@@ -2279,6 +2283,12 @@
         return rc
 
 
+class RunWebKitTestsInStressGuardmallocMode(RunWebKitTestsInStressMode):
+    name = 'run-layout-tests-in-guard-malloc-stress-mode'
+    suffix = 'guard-malloc'
+    ENABLE_GUARD_MALLOC = True
+
+
 class ReRunWebKitTests(RunWebKitTests):
     name = 're-run-layout-tests'
     NUM_FAILURES_TO_DISPLAY = 10

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


--- trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-03-31 17:06:21 UTC (rev 275286)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py	2021-03-31 17:10:46 UTC (rev 275287)
@@ -51,7 +51,8 @@
                    ReRunWebKitTests, RunAPITests, RunAPITestsWithoutPatch, RunBindingsTests, RunBuildWebKitOrgUnitTests,
                    RunBuildbotCheckConfigForBuildWebKit, RunBuildbotCheckConfigForEWS, RunEWSUnitTests, RunResultsdbpyTests,
                    RunJavaScriptCoreTests, RunJSCTestsWithoutPatch, RunWebKit1Tests, RunWebKitPerlTests, RunWebKitPyPython2Tests,
-                   RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsInStressMode, RunWebKitTestsWithoutPatch, TestWithFailureCount, ShowIdentifier,
+                   RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsInStressMode, RunWebKitTestsInStressGuardmallocMode,
+                   RunWebKitTestsWithoutPatch, TestWithFailureCount, ShowIdentifier,
                    Trigger, TransferToS3, UnApplyPatchIfRequired, UpdateWorkingDirectory, UploadBuiltProduct,
                    UploadTestResults, ValidateCommiterAndReviewer, ValidatePatch)
 
@@ -1934,9 +1935,69 @@
             + 2,
         )
         self.expectOutcome(result=FAILURE, state_string='layout-tests (failure)')
+        rc = self.runStep()
+        self.assertEqual(self.getProperty('build_summary'), 'Found test failures')
+        return rc
+
+
+class TestRunWebKitTestsInStressGuardmallocMode(BuildStepMixinAdditions, unittest.TestCase):
+    def setUp(self):
+        self.longMessage = True
+        self.jsonFileName = 'layout-test-results/full_results.json'
+        return self.setUpBuildStep()
+
+    def tearDown(self):
+        return self.tearDownBuildStep()
+
+    def configureStep(self):
+        self.setupStep(RunWebKitTestsInStressGuardmallocMode())
+        self.property_exceed_failure_limit = 'first_results_exceed_failure_limit'
+        self.property_failures = 'first_run_failures'
+
+    def test_success(self):
+        self.configureStep()
+        self.setProperty('fullPlatform', 'ios-simulator')
+        self.setProperty('configuration', 'release')
+        self.expectRemoteCommands(
+            ExpectShell(workdir='wkdir',
+                        logfiles={'json': self.jsonFileName},
+                        logEnviron=False,
+                        command=['python',
+                                 'Tools/Scripts/run-webkit-tests',
+                                 '--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],
+                        )
+            + 0,
+        )
+        self.expectOutcome(result=SUCCESS, state_string='Passed layout tests')
         return self.runStep()
 
+    def test_failure(self):
+        self.configureStep()
+        self.setProperty('fullPlatform', 'ios-simulator')
+        self.setProperty('configuration', 'release')
+        self.expectRemoteCommands(
+            ExpectShell(workdir='wkdir',
+                        logfiles={'json': self.jsonFileName},
+                        logEnviron=False,
+                        command=['python',
+                                 'Tools/Scripts/run-webkit-tests',
+                                 '--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],
+                        )
+            + ExpectShell.log('stdio', stdout='9 failures found.')
+            + 2,
+        )
+        self.expectOutcome(result=FAILURE, state_string='layout-tests (failure)')
+        rc = self.runStep()
+        self.assertEqual(self.getProperty('build_summary'), 'Found test failures')
+        return rc
 
+
 class TestRunWebKitTestsWithoutPatch(BuildStepMixinAdditions, unittest.TestCase):
     def setUp(self):
         self.longMessage = True

Modified: trunk/Tools/ChangeLog (275286 => 275287)


--- trunk/Tools/ChangeLog	2021-03-31 17:06:21 UTC (rev 275286)
+++ trunk/Tools/ChangeLog	2021-03-31 17:10:46 UTC (rev 275287)
@@ -1,5 +1,18 @@
 2021-03-31  Aakash Jain  <[email protected]>
 
+        Add build step to run layout tests for multiple iterations in guard malloc mode
+        https://bugs.webkit.org/show_bug.cgi?id=224002
+
+        Reviewed by Jonathan Bedard.
+
+        * CISupport/ews-build/steps.py:
+        (RunWebKitTests):
+        (RunWebKitTests.setLayoutTestCommand):
+        (RunWebKitTestsInStressGuardmallocMode):
+        * CISupport/ews-build/steps_unittest.py:
+
+2021-03-31  Aakash Jain  <[email protected]>
+
         Add build step to run layout tests for multiple iterations
         https://bugs.webkit.org/show_bug.cgi?id=223950
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to