[ews] JSC queues should run or skip tests based on runTests key from config.json
authoraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2019 20:56:16 +0000 (20:56 +0000)
committeraakash_jain@apple.com <aakash_jain@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 25 Sep 2019 20:56:16 +0000 (20:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=202223

Reviewed by Jonathan Bedard.

* BuildSlaveSupport/ews-build/config.json: Added the runTests key.
* BuildSlaveSupport/ews-build/factories.py:
(JSCTestsFactory.__init__): Add RunJavaScriptCoreTests step based on runTests key.
* BuildSlaveSupport/ews-build/loadConfig.py:
(loadBuilderConfig): Pass the runTests key to the factory.
* BuildSlaveSupport/ews-build/loadConfig_unittest.py:
(ConfigDotJSONTest.test_builder_keys): Added the runTests key.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250356 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/BuildSlaveSupport/ews-build/config.json
Tools/BuildSlaveSupport/ews-build/factories.py
Tools/BuildSlaveSupport/ews-build/loadConfig.py
Tools/BuildSlaveSupport/ews-build/loadConfig_unittest.py
Tools/ChangeLog

index 16acbf4..c2c08aa 100644 (file)
       "factory": "JSCTestsFactory",
       "platform": "mac-highsierra",
       "configuration": "release",
+      "runTests": "true",
       "workernames": ["ews127", "ews128"]
     },
     {
index 529c6ad..1aa7bff 100644 (file)
@@ -116,10 +116,11 @@ class TestFactory(Factory):
 
 
 class JSCTestsFactory(Factory):
-    def __init__(self, platform, configuration='release', architectures=None, additionalArguments=None, **kwargs):
+    def __init__(self, platform, configuration='release', architectures=None, additionalArguments=None, runTests='true', **kwargs):
         Factory.__init__(self, platform, configuration, architectures, False, additionalArguments, checkRelevance=True)
         self.addStep(CompileJSC(skipUpload=True))
-        self.addStep(RunJavaScriptCoreTests())
+        if runTests.lower() == 'true':
+            self.addStep(RunJavaScriptCoreTests())
 
 
 class APITestsFactory(TestFactory):
index 244df64..0e527d9 100644 (file)
@@ -62,7 +62,7 @@ def loadBuilderConfig(c, is_test_mode_enabled=False, master_prefix_path='./'):
         if 'icon' in builder:
             del builder['icon']
         factorykwargs = {}
-        for key in ['platform', 'configuration', 'architectures', 'triggers', 'additionalArguments']:
+        for key in ['platform', 'configuration', 'architectures', 'triggers', 'additionalArguments', 'runTests']:
             value = builder.pop(key, None)
             if value:
                 factorykwargs[key] = value
index 711c21a..3c7aa04 100644 (file)
@@ -39,8 +39,8 @@ class ConfigDotJSONTest(unittest.TestCase):
         cwd = os.path.dirname(os.path.abspath(__file__))
         config = json.load(open(os.path.join(cwd, 'config.json')))
         valid_builder_keys = ['additionalArguments', 'architectures', 'builddir', 'configuration', 'description',
-                              'defaultProperties', 'env', 'factory', 'icon', 'locks', 'name', 'platform', 'properties', 'shortname', 'tags',
-                              'triggers', 'workernames', 'workerbuilddir']
+                              'defaultProperties', 'env', 'factory', 'icon', 'locks', 'name', 'platform', 'properties',
+                              'runTests', 'shortname', 'tags', 'triggers', 'workernames', 'workerbuilddir']
         for builder in config.get('builders', []):
             for key in builder:
                 self.assertTrue(key in valid_builder_keys, 'Unexpected key "{}" for builder {}'.format(key, builder.get('name')))
index a1feb10..7732377 100644 (file)
@@ -1,3 +1,18 @@
+2019-09-25  Aakash Jain  <aakash_jain@apple.com>
+
+        [ews] JSC queues should run or skip tests based on runTests key from config.json
+        https://bugs.webkit.org/show_bug.cgi?id=202223
+
+        Reviewed by Jonathan Bedard.
+
+        * BuildSlaveSupport/ews-build/config.json: Added the runTests key.
+        * BuildSlaveSupport/ews-build/factories.py:
+        (JSCTestsFactory.__init__): Add RunJavaScriptCoreTests step based on runTests key.
+        * BuildSlaveSupport/ews-build/loadConfig.py:
+        (loadBuilderConfig): Pass the runTests key to the factory.
+        * BuildSlaveSupport/ews-build/loadConfig_unittest.py:
+        (ConfigDotJSONTest.test_builder_keys): Added the runTests key.
+
 2019-09-25  Jonathan Bedard  <jbedard@apple.com>
 
         results.webkit.org: Add investigation drawer