Modified: trunk/Tools/CISupport/ews-build/steps.py (275282 => 275283)
--- trunk/Tools/CISupport/ews-build/steps.py 2021-03-31 16:03:32 UTC (rev 275282)
+++ trunk/Tools/CISupport/ews-build/steps.py 2021-03-31 16:10:29 UTC (rev 275283)
@@ -2248,6 +2248,37 @@
return super(RunWebKitTests, self).getResultSummary()
+class RunWebKitTestsInStressMode(RunWebKitTests):
+ name = 'run-layout-tests-in-stress-mode'
+ suffix = 'stress-mode'
+ EXIT_AFTER_FAILURES = '10'
+ NUM_ITERATIONS = 100
+
+ def setLayoutTestCommand(self):
+ RunWebKitTests.setLayoutTestCommand(self)
+
+ self.setCommand(self.command + ['--iterations', self.NUM_ITERATIONS])
+ modified_tests = self.getProperty('modified_tests')
+ if modified_tests:
+ self.setCommand(self.command + modified_tests)
+
+ def evaluateCommand(self, cmd):
+ rc = self.evaluateResult(cmd)
+ if rc == SUCCESS or rc == WARNINGS:
+ message = 'Passed layout tests'
+ self.descriptionDone = message
+ self.build.results = SUCCESS
+ self.setProperty('build_summary', message)
+ else:
+ self.setProperty('build_summary', 'Found test failures')
+ self.build.addStepsAfterCurrentStep([
+ ArchiveTestResults(),
+ UploadTestResults(identifier=self.suffix),
+ ExtractTestResults(identifier=self.suffix),
+ ])
+ return rc
+
+
class ReRunWebKitTests(RunWebKitTests):
name = 're-run-layout-tests'
NUM_FAILURES_TO_DISPLAY = 10
Modified: trunk/Tools/CISupport/ews-build/steps_unittest.py (275282 => 275283)
--- trunk/Tools/CISupport/ews-build/steps_unittest.py 2021-03-31 16:03:32 UTC (rev 275282)
+++ trunk/Tools/CISupport/ews-build/steps_unittest.py 2021-03-31 16:10:29 UTC (rev 275283)
@@ -51,7 +51,7 @@
ReRunWebKitTests, RunAPITests, RunAPITestsWithoutPatch, RunBindingsTests, RunBuildWebKitOrgUnitTests,
RunBuildbotCheckConfigForBuildWebKit, RunBuildbotCheckConfigForEWS, RunEWSUnitTests, RunResultsdbpyTests,
RunJavaScriptCoreTests, RunJSCTestsWithoutPatch, RunWebKit1Tests, RunWebKitPerlTests, RunWebKitPyPython2Tests,
- RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsWithoutPatch, TestWithFailureCount, ShowIdentifier,
+ RunWebKitPyPython3Tests, RunWebKitTests, RunWebKitTestsInStressMode, RunWebKitTestsWithoutPatch, TestWithFailureCount, ShowIdentifier,
Trigger, TransferToS3, UnApplyPatchIfRequired, UpdateWorkingDirectory, UploadBuiltProduct,
UploadTestResults, ValidateCommiterAndReviewer, ValidatePatch)
@@ -1881,6 +1881,62 @@
return rc
+class TestRunWebKitTestsInStressMode(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(RunWebKitTestsInStressMode())
+ 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',
+ '--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',
+ '--iterations', 100],
+ )
+ + ExpectShell.log('stdio', stdout='9 failures found.')
+ + 2,
+ )
+ self.expectOutcome(result=FAILURE, state_string='layout-tests (failure)')
+ return self.runStep()
+
+
class TestRunWebKitTestsWithoutPatch(BuildStepMixinAdditions, unittest.TestCase):
def setUp(self):
self.longMessage = True