Add option to run-api-tests to force running of DISABLED tests.
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2018 22:37:22 +0000 (22:37 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2018 22:37:22 +0000 (22:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188674

Reviewed by Joseph Pecoraro.

* Scripts/webkitpy/api_tests/run_api_tests.py:
(parse_args):
* Scripts/webkitpy/api_tests/runner.py:
(Runner.command_for_port):
(_Worker._run_single_test):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/api_tests/run_api_tests.py
Tools/Scripts/webkitpy/api_tests/runner.py

index 56b02d1..b50c46b 100644 (file)
@@ -1,3 +1,16 @@
+2018-08-16  Jer Noble  <jer.noble@apple.com>
+
+        Add option to run-api-tests to force running of DISABLED tests.
+        https://bugs.webkit.org/show_bug.cgi?id=188674
+
+        Reviewed by Joseph Pecoraro.
+
+        * Scripts/webkitpy/api_tests/run_api_tests.py:
+        (parse_args):
+        * Scripts/webkitpy/api_tests/runner.py:
+        (Runner.command_for_port):
+        (_Worker._run_single_test):
+
 2018-08-16  Aakash Jain  <aakash_jain@apple.com>
 
         [ews-build] Separate queues for Builders and Testers - macOS High Sierra
index a68bc3b..903b9c4 100644 (file)
@@ -120,6 +120,9 @@ def parse_args(args):
         # FIXME: Default should be false, API tests should not be forced to run singly
         optparse.make_option('--run-singly', action='store_true', default=True,
                              help='Run a separate process for each test'),
+
+        optparse.make_option('--force', action='store_true', default=False,
+                             help='Run all tests, even DISABLED tests'),
     ]))
 
     option_parser = optparse.OptionParser(usage='%prog [options] [<path>...]')
index d6b1139..fe48b4b 100644 (file)
@@ -66,6 +66,8 @@ class Runner(object):
     # FIXME API tests should run as an app, we won't need this function <https://bugs.webkit.org/show_bug.cgi?id=175204>
     @staticmethod
     def command_for_port(port, args):
+        if (port.get_option('force')):
+            args.append('--gtest_also_run_disabled_tests=1')
         if 'simulator' in port.port_name:
             assert SimulatedDeviceManager.INITIALIZED_DEVICES
             return ['/usr/bin/xcrun', 'simctl', 'spawn', SimulatedDeviceManager.INITIALIZED_DEVICES[0].udid] + args
@@ -159,7 +161,7 @@ class _Worker(object):
             env=self._port.environment_for_api_tests())
 
         status = Runner.STATUS_RUNNING
-        if test.split('.')[1].startswith('DISABLED_'):
+        if test.split('.')[1].startswith('DISABLED_') and not self._port.get_option('force'):
             status = Runner.STATUS_DISABLED
 
         try: