<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[285137] trunk/Tools</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/285137">285137</a></dd>
<dt>Author</dt> <dd>gsnedders@apple.com</dd>
<dt>Date</dt> <dd>2021-11-01 15:15:44 -0700 (Mon, 01 Nov 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Improve LayoutTestFinder test coverage
https://bugs.webkit.org/show_bug.cgi?id=232576

Reviewed by Jonathan Bedard.

Some of these are largely copied from layout_tests/run_webkit_tests_integrationtest.py, but
in unit test form for the test finder.

* Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py:
(LayoutTestFinderTests.__init__):
(LayoutTestFinderTests):
(LayoutTestFinderTests.setUp):
(LayoutTestFinderTests.tearDown):
(LayoutTestFinderTests.test_find_no_paths_specified):
(LayoutTestFinderTests.test_find_no_paths_sorted):
(LayoutTestFinderTests.test_find_all_no_paths):
(LayoutTestFinderTests.test_includes_other_platforms):
(LayoutTestFinderTests.test_find_one_test):
(LayoutTestFinderTests.test_find_platform):
(LayoutTestFinderTests.test_find_platform_self):
(LayoutTestFinderTests.test_find_platform_other):
(LayoutTestFinderTests.test_find_platform_specific):
(LayoutTestFinderTests.test_find_platform_specific_directory):
(LayoutTestFinderTests.test_find_directory_includes_platform_specific):
(LayoutTestFinderTests.test_find_glob):
(LayoutTestFinderTests.test_find_glob_mixed_file_type_sorted):
(LayoutTestFinderTests.test_find_glob_directory):
(LayoutTestFinderTests.test_find_glob_directory_b):
(LayoutTestFinderTests.test_find_glob_directory_e):
(LayoutTestFinderTests.test_find_directory):
(LayoutTestFinderTests.test_find_directory_trailing_slash):
(LayoutTestFinderTests.test_find_directory_star):
(LayoutTestFinderTests.test_preserves_order):
(LayoutTestFinderTests.test_preserves_order_multiple_times):
(LayoutTestFinderTests.test_preserves_order_directories):
(LayoutTestFinderTests.test_preserves_order_mixed_file_type):
(LayoutTestFinderTests.test_preserves_order_mixed_file_type_b):
(LayoutTestFinderTests.test_find_directory_multiple_times):
(LayoutTestFinderTests.test_no_reference):
(LayoutTestFinderTests.test_glob_no_references):
(LayoutTestFinderTests.test_find_with_skipped_directories):
(LayoutTestFinderTests.test_find_with_skipped_directories_2):
(LayoutTestFinderTests.test_is_test_file):
(LayoutTestFinderTests.test_is_w3c_resource_file):
(LayoutTestFinderTests.make_finder): Deleted.
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(RunTest.setUp): Re-enable tests on Python 3, as this now works
(RunTest.test_child_processes_min): Also ignore tests in platform/
* Scripts/webkitpy/port/test.py:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testscontrollerslayout_test_finder_legacy_unittestpy">trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpylayout_testsrun_webkit_tests_integrationtestpy">trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py</a></li>
<li><a href="#trunkToolsScriptswebkitpyporttestpy">trunk/Tools/Scripts/webkitpy/port/test.py</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (285136 => 285137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2021-11-01 22:09:41 UTC (rev 285136)
+++ trunk/Tools/ChangeLog       2021-11-01 22:15:44 UTC (rev 285137)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2021-11-01  Sam Sneddon  <gsnedders@apple.com>
+
+        Improve LayoutTestFinder test coverage
+        https://bugs.webkit.org/show_bug.cgi?id=232576
+
+        Reviewed by Jonathan Bedard.
+
+        Some of these are largely copied from layout_tests/run_webkit_tests_integrationtest.py, but
+        in unit test form for the test finder.
+
+        * Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py:
+        (LayoutTestFinderTests.__init__):
+        (LayoutTestFinderTests):
+        (LayoutTestFinderTests.setUp):
+        (LayoutTestFinderTests.tearDown):
+        (LayoutTestFinderTests.test_find_no_paths_specified):
+        (LayoutTestFinderTests.test_find_no_paths_sorted):
+        (LayoutTestFinderTests.test_find_all_no_paths):
+        (LayoutTestFinderTests.test_includes_other_platforms):
+        (LayoutTestFinderTests.test_find_one_test):
+        (LayoutTestFinderTests.test_find_platform):
+        (LayoutTestFinderTests.test_find_platform_self):
+        (LayoutTestFinderTests.test_find_platform_other):
+        (LayoutTestFinderTests.test_find_platform_specific):
+        (LayoutTestFinderTests.test_find_platform_specific_directory):
+        (LayoutTestFinderTests.test_find_directory_includes_platform_specific):
+        (LayoutTestFinderTests.test_find_glob):
+        (LayoutTestFinderTests.test_find_glob_mixed_file_type_sorted):
+        (LayoutTestFinderTests.test_find_glob_directory):
+        (LayoutTestFinderTests.test_find_glob_directory_b):
+        (LayoutTestFinderTests.test_find_glob_directory_e):
+        (LayoutTestFinderTests.test_find_directory):
+        (LayoutTestFinderTests.test_find_directory_trailing_slash):
+        (LayoutTestFinderTests.test_find_directory_star):
+        (LayoutTestFinderTests.test_preserves_order):
+        (LayoutTestFinderTests.test_preserves_order_multiple_times):
+        (LayoutTestFinderTests.test_preserves_order_directories):
+        (LayoutTestFinderTests.test_preserves_order_mixed_file_type):
+        (LayoutTestFinderTests.test_preserves_order_mixed_file_type_b):
+        (LayoutTestFinderTests.test_find_directory_multiple_times):
+        (LayoutTestFinderTests.test_no_reference):
+        (LayoutTestFinderTests.test_glob_no_references):
+        (LayoutTestFinderTests.test_find_with_skipped_directories):
+        (LayoutTestFinderTests.test_find_with_skipped_directories_2):
+        (LayoutTestFinderTests.test_is_test_file):
+        (LayoutTestFinderTests.test_is_w3c_resource_file):
+        (LayoutTestFinderTests.make_finder): Deleted.
+        * Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
+        (RunTest.setUp): Re-enable tests on Python 3, as this now works
+        (RunTest.test_child_processes_min): Also ignore tests in platform/
+        * Scripts/webkitpy/port/test.py:
+
</ins><span class="cx"> 2021-11-01  Tim Horton  <timothy_horton@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Add a run-webkit-tests mode to A/B test a given feature
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testscontrollerslayout_test_finder_legacy_unittestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py (285136 => 285137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py      2021-11-01 22:09:41 UTC (rev 285136)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder_legacy_unittest.py 2021-11-01 22:15:44 UTC (rev 285137)
</span><span class="lines">@@ -30,8 +30,13 @@
</span><span class="cx"> 
</span><span class="cx"> from webkitpy.common.host_mock import MockHost
</span><span class="cx"> from webkitpy.common.system.filesystem_mock import MockFileSystem
</span><del>-from webkitpy.layout_tests.controllers.layout_test_finder_legacy import LayoutTestFinder, Port, _is_reference_html_file, _supported_test_extensions
-from webkitpy.port.test import add_unit_tests_to_mock_filesystem, TestPort
</del><ins>+from webkitpy.layout_tests.controllers.layout_test_finder_legacy import (
+    LayoutTestFinder,
+    Port,
+    _is_reference_html_file,
+    _supported_test_extensions,
+)
+from webkitpy.port.test import add_unit_tests_to_mock_filesystem, TestPort, unit_test_list
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class MockLayoutTestFinder(LayoutTestFinder):
</span><span class="lines">@@ -40,12 +45,21 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class LayoutTestFinderTests(unittest.TestCase):
</span><del>-    def make_finder(self):
</del><ins>+    def __init__(self, *args, **kwargs):
+        super(LayoutTestFinderTests, self).__init__(*args, **kwargs)
+        self.port = None
+        self.finder = None
+
+    def setUp(self):
</ins><span class="cx">         host = MockHost(create_stub_repository_files=True)
</span><span class="cx">         add_unit_tests_to_mock_filesystem(host.filesystem)
</span><del>-        port = TestPort(host)
-        return LayoutTestFinder(port, None)
</del><ins>+        self.port = TestPort(host)
+        self.finder = LayoutTestFinder(self.port, None)
</ins><span class="cx"> 
</span><ins>+    def tearDown(self):
+        self.port = None
+        self.finder = None
+
</ins><span class="cx">     def test_supported_test_extensions(self):
</span><span class="cx">         self.assertEqual(_supported_test_extensions & Port._supported_reference_extensions, Port._supported_reference_extensions)
</span><span class="cx"> 
</span><span class="lines">@@ -62,32 +76,289 @@
</span><span class="cx">         self.assertFalse(_is_reference_html_file(filesystem, '', 'foo-expected.mht'))
</span><span class="cx"> 
</span><span class="cx">     def test_find_no_paths_specified(self):
</span><del>-        finder = self.make_finder()
-        tests = finder.find_tests_by_path([])
-        self.assertNotEqual(len(tests), 0)
</del><ins>+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path([])]
+        self.assertNotEqual(tests, [])
</ins><span class="cx"> 
</span><ins>+    def test_find_no_paths_sorted(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path([])]
+        sorted_tests = sorted(tests, key=self.port.test_key)
+        self.assertEqual(tests, sorted_tests)
+
+    def test_find_all_no_paths(self):
+        finder = self.finder
+        empty_tests = [t.test_path for t in finder.find_tests_by_path([])]
+        star_tests = [t.test_path for t in finder.find_tests_by_path(['*'])]
+        self.assertEqual(empty_tests, star_tests)
+
+    def test_includes_other_platforms(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path([])]
+        self.assertEqual(self.port.name(), 'test-mac-leopard')
+        self.assertIn('platform/test-snow-leopard/websocket/test.html', tests)
+
</ins><span class="cx">     def test_find_one_test(self):
</span><del>-        finder = self.make_finder()
-        tests = finder.find_tests_by_path(['failures/expected/image.html'])
-        self.assertEqual(len(tests), 1)
</del><ins>+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['failures/expected/image.html'])]
+        self.assertEqual(tests, ['failures/expected/image.html'])
</ins><span class="cx"> 
</span><ins>+    def test_find_platform(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['platform'])]
+        self.assertEqual(
+            tests,
+            [
+                'platform/test-mac-leopard/http/test.html',
+                'platform/test-mac-leopard/passes/platform-specific-test.html',
+                'platform/test-mac-leopard/platform-specific-dir/platform-specific-test.html',
+                'platform/test-snow-leopard/http/test.html',
+                'platform/test-snow-leopard/websocket/test.html',
+                'platform/test-win-7sp0/http/test.html',
+            ],
+        )
+        with_slash = [t.test_path for t in finder.find_tests_by_path(['platform/'])]
+        self.assertEqual(tests, with_slash)
+        with_star = [t.test_path for t in finder.find_tests_by_path(['platform/*'])]
+        self.assertEqual(tests, with_star)
+
+    def test_find_platform_self(self):
+        finder = self.finder
+        self.assertEqual(self.port.name(), 'test-mac-leopard')
+        tests = [t.test_path for t in finder.find_tests_by_path(['platform/test-mac-leopard'])]
+        self.assertEqual(
+            tests,
+            [
+                'platform/test-mac-leopard/http/test.html',
+                'platform/test-mac-leopard/passes/platform-specific-test.html',
+                'platform/test-mac-leopard/platform-specific-dir/platform-specific-test.html',
+            ],
+        )
+
+    def test_find_platform_other(self):
+        finder = self.finder
+        self.assertEqual(self.port.name(), 'test-mac-leopard')
+        tests = [t.test_path for t in finder.find_tests_by_path(['platform/test-snow-leopard'])]
+        self.assertEqual(
+            tests,
+            [
+                'platform/test-snow-leopard/http/test.html',
+                'platform/test-snow-leopard/websocket/test.html',
+            ],
+        )
+
+    def test_find_platform_specific(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['http/test.html'])]
+        self.assertEqual(tests, [])
+
+    def test_find_platform_specific_directory(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['platform-specific-dir'])]
+        self.assertEqual(tests, [])
+        with_slash = [t.test_path for t in finder.find_tests_by_path(['platform-specific-dir/'])]
+        self.assertEqual(tests, with_slash)
+        with_star = [t.test_path for t in finder.find_tests_by_path(['platform-specific-dir/*'])]
+        self.assertEqual(tests, with_star)
+
+    def test_find_directory_includes_platform_specific(self):
+        # contrast with test_find_platform_specific above
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['http'])]
+        self.assertEqual(
+            tests,
+            [
+                'http/tests/passes/image.html',
+                'http/tests/passes/text.html',
+                'http/tests/ssl/text.html',
+                'platform/test-mac-leopard/http/test.html',
+            ],
+        )
+
</ins><span class="cx">     def test_find_glob(self):
</span><del>-        finder = self.make_finder()
-        tests = finder.find_tests_by_path(['failures/expected/im*'])
-        self.assertEqual(len(tests), 2)
</del><ins>+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['failures/expected/im*'])]
+        self.assertEqual(
+            tests, ['failures/expected/image.html', 'failures/expected/image_checksum.html']
+        )
</ins><span class="cx"> 
</span><ins>+    # these are commented out as MockFileSystem doesn't support anything but *
+    # def test_find_glob_b(self):
+    #     finder = self.finder
+    #     tests = [t.test_path for t in finder.find_tests_by_path(['failures/expected/i?age.html'])]
+    #     self.assertEqual(tests, ['failures/expected/image.html'])
+
+    # def test_find_glob_c(self):
+    #     finder = self.finder
+    #     tests = [t.test_path for t in finder.find_tests_by_path(['failures/expected/i[m]age.html'])]
+    #     self.assertEqual(tests, ['failures/expected/image.html'])
+
+    def test_find_glob_mixed_file_type_sorted(self):
+        finder = self.finder
+        # this should expand the *, sort the result, then recurse;
+        # notably this therefore puts passes/skipped/ < passes/svgreftest.svg
+
+        # test the short, simple case first
+        tests = [t.test_path for t in finder.find_tests_by_path(['passes/s*'])]
+        self.assertEqual(tests, ['passes/skipped/skip.html', 'passes/svgreftest.svg'])
+
+        # then test the whole directory (check directories aren't just sorted first)
+        tests = [t.test_path for t in finder.find_tests_by_path(['passes/*'])]
+        self.assertEqual(
+            tests,
+            [
+                'passes/args.html',
+                'passes/audio-tolerance.html',
+                'passes/audio.html',
+                'passes/checksum_in_image.html',
+                'passes/error.html',
+                'passes/image.html',
+                'passes/mismatch.html',
+                'passes/phpreftest.php',
+                'passes/platform_image.html',
+                'passes/reftest.html',
+                'passes/skipped/skip.html',
+                'passes/svgreftest.svg',
+                'passes/text.html',
+                'passes/xhtreftest.xht',
+            ],
+        )
+
+    def test_find_glob_directory(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['fai*ures/expected/image.html'])]
+        self.assertEqual(tests, ['failures/expected/image.html'])
+        tests = [t.test_path for t in finder.find_tests_by_path(['failures/*xpected/image.html'])]
+        self.assertEqual(tests, ['failures/expected/image.html'])
+
+    def test_find_glob_directory_b(self):
+        finder = self.finder
+        glob_tests = [t.test_path for t in finder.find_tests_by_path(['fai*ures'])]
+        plain_tests = [t.test_path for t in finder.find_tests_by_path(['failures'])]
+        self.assertEqual(plain_tests, glob_tests)
+        glob_slash_tests = [t.test_path for t in finder.find_tests_by_path(['fai*ures/'])]
+        self.assertEqual(plain_tests, glob_slash_tests)
+
+    def test_find_glob_directory_e(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['h*tp'])]
+        # contrast with test_find_directory_includes_platform_specific;
+        # this excludes the platform/*/http/ tests
+        self.assertEqual(
+            tests,
+            [
+                'http/tests/passes/image.html',
+                'http/tests/passes/text.html',
+                'http/tests/ssl/text.html',
+            ],
+        )
+
+    def test_find_directory(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['websocket/tests'])]
+        self.assertEqual(tests, ['websocket/tests/passes/text.html'])
+
+    def test_find_directory_trailing_slash(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['websocket/tests/'])]
+        self.assertEqual(tests, ['websocket/tests/passes/text.html'])
+
+    def test_find_directory_star(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['websocket/tests/*'])]
+        self.assertEqual(tests, ['websocket/tests/passes/text.html'])
+
+    def test_preserves_order(self):
+        tests_to_find = [
+            'passes/audio.html',
+            'failures/expected/text.html',
+            'failures/expected/missing_text.html',
+            'passes/args.html',
+        ]
+        finder = self.finder
+        tests_found = [t.test_path for t in finder.find_tests_by_path(tests_to_find)]
+        self.assertEqual(tests_to_find, tests_found)
+
+    def test_preserves_order_multiple_times(self):
+        tests_to_find = [
+            'passes/args.html',
+            'passes/audio.html',
+            'passes/audio.html',
+            'passes/args.html',
+        ]
+        finder = self.finder
+        tests_found = [t.test_path for t in finder.find_tests_by_path(tests_to_find)]
+        self.assertEqual(tests_to_find, tests_found)
+
+    def test_preserves_order_directories(self):
+        tests_to_find = ['http/tests/ssl', 'http/tests/passes']
+        finder = self.finder
+        tests_found = [t.test_path for t in finder.find_tests_by_path(tests_to_find)]
+        self.assertEqual(
+            tests_found,
+            [
+                'http/tests/ssl/text.html',
+                'http/tests/passes/image.html',
+                'http/tests/passes/text.html',
+            ],
+        )
+
+    def test_preserves_order_mixed_file_type(self):
+        tests_to_find = ['passes/skipped', 'passes/args.html']
+        finder = self.finder
+        tests_found = [t.test_path for t in finder.find_tests_by_path(tests_to_find)]
+        self.assertEqual(tests_found, ['passes/skipped/skip.html', 'passes/args.html'])
+
+    def test_preserves_order_mixed_file_type_b(self):
+        tests_to_find = ['passes/args.html', 'passes/skipped']
+        finder = self.finder
+        tests_found = [t.test_path for t in finder.find_tests_by_path(tests_to_find)]
+        self.assertEqual(tests_found, ['passes/args.html', 'passes/skipped/skip.html'])
+
+    def test_find_directory_multiple_times(self):
+        finder = self.finder
+        tests = [
+            t.test_path
+            for t in finder.find_tests_by_path(['websocket/tests/', 'websocket/tests/'])
+        ]
+        self.assertEqual(
+            tests, ['websocket/tests/passes/text.html', 'websocket/tests/passes/text.html']
+        )
+
+    def test_no_reference(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['passes/reftest-expected.html'])]
+        self.assertEqual(tests, [])
+
+    def test_glob_no_references(self):
+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['passes/*reftest*'])]
+        self.assertEqual(
+            tests,
+            [
+                'passes/phpreftest.php',
+                'passes/reftest.html',
+                'passes/svgreftest.svg',
+                'passes/xhtreftest.xht',
+            ],
+        )
+
</ins><span class="cx">     def test_find_with_skipped_directories(self):
</span><del>-        finder = self.make_finder()
-        tests = finder.find_tests_by_path(['userscripts'])
-        self.assertNotIn('userscripts/resources/iframe.html', [test.test_path for test in tests])
</del><ins>+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['userscripts'])]
+        self.assertNotIn('userscripts/resources/iframe.html', tests)
</ins><span class="cx"> 
</span><span class="cx">     def test_find_with_skipped_directories_2(self):
</span><del>-        finder = self.make_finder()
-        tests = finder.find_tests_by_path(['userscripts/resources'])
</del><ins>+        finder = self.finder
+        tests = [t.test_path for t in finder.find_tests_by_path(['userscripts/resources'])]
</ins><span class="cx">         self.assertEqual(tests, [])
</span><ins>+        tests = [t.test_path for t in finder.find_tests_by_path(['userscripts/resources/'])]
+        self.assertEqual(tests, [])
+        tests = [t.test_path for t in finder.find_tests_by_path(['userscripts/resources/*'])]
+        self.assertEqual(tests, [])
</ins><span class="cx"> 
</span><span class="cx">     def test_is_test_file(self):
</span><del>-        finder = self.make_finder()
</del><ins>+        finder = self.finder
</ins><span class="cx">         self.assertTrue(finder._is_test_file(finder._filesystem, '', 'foo.html'))
</span><span class="cx">         self.assertTrue(finder._is_test_file(finder._filesystem, '', 'foo.shtml'))
</span><span class="cx">         self.assertTrue(finder._is_test_file(finder._filesystem, '', 'foo.svg'))
</span><span class="lines">@@ -113,7 +384,7 @@
</span><span class="cx">         self.assertTrue(finder._is_test_file(finder._filesystem, '', 'foo-root.xml'))
</span><span class="cx"> 
</span><span class="cx">     def test_is_w3c_resource_file(self):
</span><del>-        finder = self.make_finder()
</del><ins>+        finder = self.finder
</ins><span class="cx"> 
</span><span class="cx">         finder._filesystem.write_text_file(finder._port.layout_tests_dir() + "/imported/w3c/resources/resource-files.json", """
</span><span class="cx"> {"directories": [
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpylayout_testsrun_webkit_tests_integrationtestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py (285136 => 285137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py    2021-11-01 22:09:41 UTC (rev 285136)
+++ trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py       2021-11-01 22:15:44 UTC (rev 285137)
</span><span class="lines">@@ -174,8 +174,7 @@
</span><span class="cx"> 
</span><span class="cx">         # FIXME: Remove this when we fix test-webkitpy to work
</span><span class="cx">         # properly on cygwin (bug 63846).
</span><del>-        # FIXME: Multiprocessing doesn't do well when nested in Python 3 (https://bugs.webkit.org/show_bug.cgi?id=205280)
-        self.should_test_processes = not self._platform.is_win() and sys.version_info < (3, 0)
</del><ins>+        self.should_test_processes = not self._platform.is_win()
</ins><span class="cx"> 
</span><span class="cx">     def serial_test_basic(self):
</span><span class="cx">         options, args = parse_args(tests_included=True)
</span><span class="lines">@@ -223,7 +222,7 @@
</span><span class="cx">     def test_child_processes_min(self):
</span><span class="cx">         if self.should_test_processes:
</span><span class="cx">             _, regular_output, _ = logging_run(
</span><del>-                ['--debug-rwt-logging', '--child-processes', '2', '-i', 'passes/passes', 'passes'],
</del><ins>+                ['--debug-rwt-logging', '--child-processes', '2', '-i', 'passes/passes', '-i', 'platform', 'passes'],
</ins><span class="cx">                 tests_included=True, shared_port=False)
</span><span class="cx">             self.assertTrue(any(['Running 1 ' in line for line in regular_output.getvalue().splitlines()]))
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpyporttestpy"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/port/test.py (285136 => 285137)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/port/test.py        2021-11-01 22:09:41 UTC (rev 285136)
+++ trunk/Tools/Scripts/webkitpy/port/test.py   2021-11-01 22:15:44 UTC (rev 285137)
</span><span class="lines">@@ -106,7 +106,7 @@
</span><span class="cx"> #
</span><span class="cx"> # These numbers may need to be updated whenever we add or delete tests.
</span><span class="cx"> #
</span><del>-TOTAL_TESTS = 69
</del><ins>+TOTAL_TESTS = 71
</ins><span class="cx"> TOTAL_SKIPS = 9
</span><span class="cx"> TOTAL_RETRIES = 11
</span><span class="cx"> 
</span><span class="lines">@@ -239,6 +239,8 @@
</span><span class="cx">     tests.add('websocket/tests/passes/text.html')
</span><span class="cx"> 
</span><span class="cx">     # For testing test are properly included from platform directories.
</span><ins>+    tests.add('platform/test-mac-leopard/passes/platform-specific-test.html')
+    tests.add('platform/test-mac-leopard/platform-specific-dir/platform-specific-test.html')
</ins><span class="cx">     tests.add('platform/test-mac-leopard/http/test.html')
</span><span class="cx">     tests.add('platform/test-win-7sp0/http/test.html')
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>