Title: [254654] trunk/Tools
Revision
254654
Author
[email protected]
Date
2020-01-15 16:35:55 -0800 (Wed, 15 Jan 2020)

Log Message

run-api-tests no longer supports wildcards in test names
https://bugs.webkit.org/show_bug.cgi?id=206319
<rdar://problem/58351608>

Reviewed by Chris Dumez.

* Scripts/webkitpy/api_tests/manager.py:
(Manager._find_test_subset):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (254653 => 254654)


--- trunk/Tools/ChangeLog	2020-01-16 00:09:50 UTC (rev 254653)
+++ trunk/Tools/ChangeLog	2020-01-16 00:35:55 UTC (rev 254654)
@@ -1,3 +1,14 @@
+2020-01-15  Jonathan Bedard  <[email protected]>
+
+        run-api-tests no longer supports wildcards in test names
+        https://bugs.webkit.org/show_bug.cgi?id=206319
+        <rdar://problem/58351608>
+
+        Reviewed by Chris Dumez.
+
+        * Scripts/webkitpy/api_tests/manager.py:
+        (Manager._find_test_subset):
+
 2020-01-15  David Kilzer  <[email protected]>
 
         Enable -Wconditional-uninitialized in DumpRenderTree, WebKitTestRunner

Modified: trunk/Tools/Scripts/webkitpy/api_tests/manager.py (254653 => 254654)


--- trunk/Tools/Scripts/webkitpy/api_tests/manager.py	2020-01-16 00:09:50 UTC (rev 254653)
+++ trunk/Tools/Scripts/webkitpy/api_tests/manager.py	2020-01-16 00:35:55 UTC (rev 254654)
@@ -22,6 +22,7 @@
 
 import json
 import logging
+import re
 import time
 
 from webkitpy.api_tests.runner import Runner
@@ -73,19 +74,28 @@
     def _find_test_subset(superset, arg_filter):
         result = []
         for arg in arg_filter:
-            split_arg = arg.split('.')
+            # Might match <binary>.<suite>.<test> or just <suite>.<test>
+            arg_re = re.compile('^{}$'.format(arg.replace('*', '.*')))
             for test in superset:
-                # Might match <binary>.<suite>.<test> or just <suite>.<test>
+                if arg_re.match(test):
+                    result.append(test)
+                    continue
+
                 split_test = test.split('.')
-                if len(split_arg) == 1:
-                    if test not in result and (arg == split_test[0] or arg == split_test[1]):
-                        result.append(test)
-                elif len(split_arg) == 2:
-                    if test not in result and (split_arg == split_test[0:2] or split_arg == split_test[1:3]):
-                        result.append(test)
-                else:
-                    if arg == test and test not in result:
-                        result.append(test)
+                if len(split_test) == 1:
+                    continue
+                if arg_re.match('.'.join(split_test[1:])):
+                    result.append(test)
+                    continue
+                if arg_re.match('.'.join(split_test[:-1])):
+                    result.append(test)
+                    continue
+
+                if len(split_test) == 2:
+                    continue
+                if arg_re.match('.'.join(split_test[1:-1])):
+                    result.append(test)
+                    continue
         return result
 
     def _collect_tests(self, args):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to