Title: [260897] trunk/Tools
Revision
260897
Author
[email protected]
Date
2020-04-29 08:25:07 -0700 (Wed, 29 Apr 2020)

Log Message

[ews] Display flaky test names in build summary when ReRunJavaScriptCoreTests passes
https://bugs.webkit.org/show_bug.cgi?id=210855

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(ReRunJavaScriptCoreTests.evaluateCommand): Display flaky test names in build summary.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests and removed extra TestReRunJavaScriptCoreTests class.

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2020-04-29 14:55:55 UTC (rev 260896)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2020-04-29 15:25:07 UTC (rev 260897)
@@ -1505,8 +1505,14 @@
 
     def evaluateCommand(self, cmd):
         rc = shell.Test.evaluateCommand(self, cmd)
+        first_run_failures = set(self.getProperty('jsc_stress_test_failures', []) + self.getProperty('jsc_binary_failures', []))
+        second_run_failures = set(self.getProperty('jsc_rerun_stress_test_failures', []) + self.getProperty('jsc_rerun_binary_failures', []))
+        flaky_failures = first_run_failures.union(second_run_failures) - first_run_failures.intersection(second_run_failures)
+        flaky_failures_string = ', '.join(flaky_failures)
+
         if rc == SUCCESS or rc == WARNINGS:
-            message = 'Passed JSC tests'
+            pluralSuffix = 's' if len(flaky_failures) > 1 else ''
+            message = 'Found flaky test{}: {}'.format(pluralSuffix, flaky_failures_string)
             self.descriptionDone = message
             self.build.results = SUCCESS
             self.build.buildFinished([message], SUCCESS)

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2020-04-29 14:55:55 UTC (rev 260896)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2020-04-29 15:25:07 UTC (rev 260897)
@@ -433,11 +433,6 @@
         return self.runStep()
 
 
-class TestReRunJavaScriptCoreTests(TestRunWebKitPerlTests):
-    def configureStep(self):
-        self.setupStep(ReRunWebKitPerlTests())
-
-
 class TestWebKitPyPython2Tests(BuildStepMixinAdditions, unittest.TestCase):
     def setUp(self):
         self.longMessage = True
@@ -1348,7 +1343,36 @@
         if configuration:
             self.setProperty('configuration', configuration)
 
+    def test_success(self):
+        self.configureStep(platform='mac', fullPlatform='mac-highsierra', configuration='release')
+        self.setProperty('jsc_stress_test_failures', ['test1', 'test2'])
+        self.expectRemoteCommands(
+            ExpectShell(workdir='wkdir',
+                        logEnviron=False,
+                        command=['perl', 'Tools/Scripts/run-_javascript_core-tests', '--no-build', '--no-fail-fast', '--json-output={0}'.format(self.jsonFileName), '--release'],
+                        logfiles={'json': self.jsonFileName},
+                        ) +
+            0,
+        )
+        self.expectOutcome(result=SUCCESS, state_string='Found flaky tests: test1, test2')
+        return self.runStep()
 
+    def test_remote_success(self):
+        self.configureStep(platform='jsc-only', fullPlatform='jsc-only', configuration='release')
+        self.setProperty('remotes', 'remote-machines.json')
+        self.setProperty('jsc_binary_failures', ['testmasm'])
+        self.expectRemoteCommands(
+            ExpectShell(workdir='wkdir',
+                        logEnviron=False,
+                        command=['perl', 'Tools/Scripts/run-_javascript_core-tests', '--no-build', '--no-fail-fast', '--json-output={0}'.format(self.jsonFileName), '--release', '--remote-config-file=remote-machines.json', '--no-testmasm', '--no-testair', '--no-testb3', '--no-testdfg', '--no-testapi', '--memory-limited', '--jsc-only'],
+                        logfiles={'json': self.jsonFileName},
+                        ) +
+            0,
+        )
+        self.expectOutcome(result=SUCCESS, state_string='Found flaky test: testmasm')
+        return self.runStep()
+
+
 class TestRunJSCTestsWithoutPatch(BuildStepMixinAdditions, unittest.TestCase):
     def setUp(self):
         self.longMessage = True

Modified: trunk/Tools/ChangeLog (260896 => 260897)


--- trunk/Tools/ChangeLog	2020-04-29 14:55:55 UTC (rev 260896)
+++ trunk/Tools/ChangeLog	2020-04-29 15:25:07 UTC (rev 260897)
@@ -1,3 +1,14 @@
+2020-04-29  Aakash Jain  <[email protected]>
+
+        [ews] Display flaky test names in build summary when ReRunJavaScriptCoreTests passes
+        https://bugs.webkit.org/show_bug.cgi?id=210855
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (ReRunJavaScriptCoreTests.evaluateCommand): Display flaky test names in build summary.
+        * BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests and removed extra TestReRunJavaScriptCoreTests class.
+
 2020-04-29  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Fix GTK4 build after r260891
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to