Title: [247683] trunk/Tools
Revision
247683
Author
[email protected]
Date
2019-07-22 08:48:36 -0700 (Mon, 22 Jul 2019)

Log Message

[ews-build] ReRunWebKitTests should use similar logic for evaluateCommand as RunWebKitTests
https://bugs.webkit.org/show_bug.cgi?id=199980

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps.py:
(ReRunWebKitTests.evaluateCommand): Updatd to use similar logic as RunWebKitTests.
* BuildSlaveSupport/ews-build/steps_unittest.py:
(TestRunWebKitTests): Modified to make it generic so as to re-use tests.
(TestReRunWebKitTests): Run all TestRunWebKitTests unit-tests for ReRunWebKitTests as well.

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2019-07-22 14:25:00 UTC (rev 247682)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps.py	2019-07-22 15:48:36 UTC (rev 247683)
@@ -962,8 +962,8 @@
     name = 're-run-layout-tests'
 
     def evaluateCommand(self, cmd):
-        rc = shell.Test.evaluateCommand(self, cmd)
-        if rc == SUCCESS:
+        rc = self.evaluateResult(cmd)
+        if rc == SUCCESS or rc == WARNINGS:
             message = 'Passed layout tests'
             self.descriptionDone = message
             self.build.results = SUCCESS

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2019-07-22 14:25:00 UTC (rev 247682)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2019-07-22 15:48:36 UTC (rev 247683)
@@ -38,7 +38,7 @@
                    CheckOutSource, CheckOutSpecificRevision, CheckPatchRelevance, CheckStyle, CleanBuild, CleanUpGitIndexLock, CleanWorkingDirectory,
                    CompileJSCOnly, CompileJSCOnlyToT, CompileWebKit, CompileWebKitToT, ConfigureBuild,
                    DownloadBuiltProduct, ExtractBuiltProduct, ExtractTestResults, InstallGtkDependencies, InstallWpeDependencies, KillOldProcesses,
-                   PrintConfiguration, ReRunAPITests, ReRunJavaScriptCoreTests, RunAPITests, RunAPITestsWithoutPatch,
+                   PrintConfiguration, ReRunAPITests, ReRunJavaScriptCoreTests, ReRunWebKitTests, RunAPITests, RunAPITestsWithoutPatch,
                    RunBindingsTests, RunJavaScriptCoreTests, RunJavaScriptCoreTestsToT, RunWebKit1Tests, RunWebKitPerlTests,
                    RunWebKitPyTests, RunWebKitTests, TestWithFailureCount, Trigger, TransferToS3, UnApplyPatchIfRequired,
                    UploadBuiltProduct, UploadTestResults, ValidatePatch)
@@ -970,8 +970,13 @@
     def tearDown(self):
         return self.tearDownBuildStep()
 
+    def configureStep(self):
+        self.setupStep(RunWebKitTests())
+        self.property_exceed_failure_limit = 'first_results_exceed_failure_limit'
+        self.property_failures = 'first_run_failures'
+
     def test_success(self):
-        self.setupStep(RunWebKitTests())
+        self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
@@ -985,7 +990,7 @@
         return self.runStep()
 
     def test_warnings(self):
-        self.setupStep(RunWebKitTests())
+        self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
@@ -1002,7 +1007,7 @@
         return self.runStep()
 
     def test_parse_results_json_regression(self):
-        self.setupStep(RunWebKitTests())
+        self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
@@ -1015,8 +1020,8 @@
         )
         self.expectOutcome(result=FAILURE, state_string='layout-tests (failure)')
         rc = self.runStep()
-        self.assertEqual(self.getProperty('first_results_exceed_failure_limit'), True)
-        self.assertEqual(self.getProperty('first_run_failures'),
+        self.assertEqual(self.getProperty(self.property_exceed_failure_limit), True)
+        self.assertEqual(self.getProperty(self.property_failures),
                             ["imported/w3c/web-platform-tests/IndexedDB/interleaved-cursors-large.html",
                              "imported/w3c/web-platform-tests/wasm/jsapi/interface.any.html",
                              "imported/w3c/web-platform-tests/wasm/jsapi/instance/constructor-bad-imports.any.html",
@@ -1030,7 +1035,7 @@
         return rc
 
     def test_parse_results_json_flakes(self):
-        self.setupStep(RunWebKitTests())
+        self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
@@ -1043,12 +1048,12 @@
         )
         self.expectOutcome(result=SUCCESS, state_string='Passed layout tests')
         rc = self.runStep()
-        self.assertEqual(self.getProperty('first_results_exceed_failure_limit'), False)
-        self.assertEqual(self.getProperty('first_run_failures'), [])
+        self.assertEqual(self.getProperty(self.property_exceed_failure_limit), False)
+        self.assertEqual(self.getProperty(self.property_failures), [])
         return rc
 
     def test_parse_results_json_flakes_and_regressions(self):
-        self.setupStep(RunWebKitTests())
+        self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
@@ -1061,12 +1066,12 @@
         )
         self.expectOutcome(result=FAILURE, state_string='layout-tests (failure)')
         rc = self.runStep()
-        self.assertEqual(self.getProperty('first_results_exceed_failure_limit'), False)
-        self.assertEqual(self.getProperty('first_run_failures'), ['fast/scrolling/ios/reconcile-layer-position-recursive.html'])
+        self.assertEqual(self.getProperty(self.property_exceed_failure_limit), False)
+        self.assertEqual(self.getProperty(self.property_failures), ['fast/scrolling/ios/reconcile-layer-position-recursive.html'])
         return rc
 
     def test_unexpected_error(self):
-        self.setupStep(RunWebKitTests())
+        self.configureStep()
         self.setProperty('fullPlatform', 'mac-highsierra')
         self.setProperty('configuration', 'debug')
         self.expectRemoteCommands(
@@ -1081,7 +1086,7 @@
         return self.runStep()
 
     def test_failure(self):
-        self.setupStep(RunWebKitTests())
+        self.configureStep()
         self.setProperty('fullPlatform', 'ios-simulator')
         self.setProperty('configuration', 'release')
         self.expectRemoteCommands(
@@ -1096,6 +1101,13 @@
         return self.runStep()
 
 
+class TestReRunWebKitTests(TestRunWebKitTests):
+    def configureStep(self):
+        self.setupStep(ReRunWebKitTests())
+        self.property_exceed_failure_limit = 'second_results_exceed_failure_limit'
+        self.property_failures = 'second_run_failures'
+
+
 class TestRunWebKit1Tests(BuildStepMixinAdditions, unittest.TestCase):
     def setUp(self):
         self.longMessage = True

Modified: trunk/Tools/ChangeLog (247682 => 247683)


--- trunk/Tools/ChangeLog	2019-07-22 14:25:00 UTC (rev 247682)
+++ trunk/Tools/ChangeLog	2019-07-22 15:48:36 UTC (rev 247683)
@@ -1,3 +1,16 @@
+2019-07-22  Aakash Jain  <[email protected]>
+
+        [ews-build] ReRunWebKitTests should use similar logic for evaluateCommand as RunWebKitTests
+        https://bugs.webkit.org/show_bug.cgi?id=199980
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/steps.py:
+        (ReRunWebKitTests.evaluateCommand): Updatd to use similar logic as RunWebKitTests.
+        * BuildSlaveSupport/ews-build/steps_unittest.py:
+        (TestRunWebKitTests): Modified to make it generic so as to re-use tests.
+        (TestReRunWebKitTests): Run all TestRunWebKitTests unit-tests for ReRunWebKitTests as well.
+
 2019-07-22  Carlos Alberto Lopez Perez  <[email protected]>
 
         [webkitpy] Add an unit test for setting up the driver environment without starting it.
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to