Title: [252375] trunk/Tools
Revision
252375
Author
[email protected]
Date
2019-11-12 15:04:36 -0800 (Tue, 12 Nov 2019)

Log Message

Update unit-tests for JSC EWS
https://bugs.webkit.org/show_bug.cgi?id=204123

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/steps_unittest.py:
(TestRunJavaScriptCoreTests.configureStep):
(TestRunJavaScriptCoreTests.test_success): Updated platform to mac-highsierra.
(TestRunJavaScriptCoreTests.test_failure): Ditto.
(TestRunJavaScriptCoreTests.test_remote_success): Unit-test for jsc-only platform.
(TestReRunJavaScriptCoreTests): Automatically run all unit-tests from TestRunJavaScriptCoreTests class.

Modified Paths

Diff

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


--- trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2019-11-12 22:09:37 UTC (rev 252374)
+++ trunk/Tools/BuildSlaveSupport/ews-build/steps_unittest.py	2019-11-12 23:04:36 UTC (rev 252375)
@@ -996,10 +996,17 @@
     def tearDown(self):
         return self.tearDownBuildStep()
 
+    def configureStep(self, platform=None, fullPlatform=None, configuration=None):
+        self.setupStep(RunJavaScriptCoreTests())
+        if platform:
+            self.setProperty('platform', platform)
+        if fullPlatform:
+            self.setProperty('fullPlatform', fullPlatform)
+        if configuration:
+            self.setProperty('configuration', configuration)
+
     def test_success(self):
-        self.setupStep(RunJavaScriptCoreTests())
-        self.setProperty('fullPlatform', 'jsc-only')
-        self.setProperty('configuration', 'release')
+        self.configureStep(platform='mac', fullPlatform='mac-highsierra', configuration='release')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         logEnviron=False,
@@ -1012,14 +1019,12 @@
         return self.runStep()
 
     def test_remote_success(self):
-        self.setupStep(RunJavaScriptCoreTests())
-        self.setProperty('fullPlatform', 'jsc-only')
-        self.setProperty('configuration', 'release')
+        self.configureStep(platform='jsc-only', fullPlatform='jsc-only', configuration='release')
         self.setProperty('remotes', 'remote-machines.json')
         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'],
+                        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', '--jsc-only'],
                         logfiles={'json': self.jsonFileName},
                         )
             + 0,
@@ -1028,9 +1033,7 @@
         return self.runStep()
 
     def test_failure(self):
-        self.setupStep(RunJavaScriptCoreTests())
-        self.setProperty('fullPlatform', 'jsc-only')
-        self.setProperty('configuration', 'debug')
+        self.configureStep(platform='mac', fullPlatform='mac-highsierra', configuration='debug')
         self.expectRemoteCommands(
             ExpectShell(workdir='wkdir',
                         logEnviron=False,
@@ -1044,47 +1047,17 @@
         return self.runStep()
 
 
-class TestReRunJavaScriptCoreTests(BuildStepMixinAdditions, unittest.TestCase):
-    def setUp(self):
-        self.longMessage = True
-        self.jsonFileName = 'jsc_results.json'
-        return self.setUpBuildStep()
-
-    def tearDown(self):
-        return self.tearDownBuildStep()
-
-    def test_success(self):
+class TestReRunJavaScriptCoreTests(TestRunJavaScriptCoreTests):
+    def configureStep(self, platform=None, fullPlatform=None, configuration=None):
         self.setupStep(ReRunJavaScriptCoreTests())
-        self.setProperty('fullPlatform', 'jsc-only')
-        self.setProperty('configuration', 'release')
-        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='Passed JSC tests')
-        return self.runStep()
+        if platform:
+            self.setProperty('platform', platform)
+        if fullPlatform:
+            self.setProperty('fullPlatform', fullPlatform)
+        if configuration:
+            self.setProperty('configuration', configuration)
 
-    def test_failure(self):
-        self.setupStep(ReRunJavaScriptCoreTests())
-        self.setProperty('fullPlatform', 'jsc-only')
-        self.setProperty('configuration', 'debug')
-        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), '--debug'],
-                        logfiles={'json': self.jsonFileName},
-                        )
-            + ExpectShell.log('stdio', stdout='9 failures found.')
-            + 2,
-        )
-        self.expectOutcome(result=FAILURE, state_string='jscore-tests (failure)')
-        return self.runStep()
 
-
 class TestRunJSCTestsWithoutPatch(BuildStepMixinAdditions, unittest.TestCase):
     def setUp(self):
         self.longMessage = True

Modified: trunk/Tools/ChangeLog (252374 => 252375)


--- trunk/Tools/ChangeLog	2019-11-12 22:09:37 UTC (rev 252374)
+++ trunk/Tools/ChangeLog	2019-11-12 23:04:36 UTC (rev 252375)
@@ -1,3 +1,17 @@
+2019-11-12  Aakash Jain  <[email protected]>
+
+        Update unit-tests for JSC EWS
+        https://bugs.webkit.org/show_bug.cgi?id=204123
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/steps_unittest.py:
+        (TestRunJavaScriptCoreTests.configureStep):
+        (TestRunJavaScriptCoreTests.test_success): Updated platform to mac-highsierra.
+        (TestRunJavaScriptCoreTests.test_failure): Ditto.
+        (TestRunJavaScriptCoreTests.test_remote_success): Unit-test for jsc-only platform.
+        (TestReRunJavaScriptCoreTests): Automatically run all unit-tests from TestRunJavaScriptCoreTests class.
+
 2019-11-12  Diego Pino Garcia  <[email protected]>
 
         [GTK] Add 'test262-test' step to GTK and WPE build bots
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to