Skip to content

Commit

Permalink
Remove current macOS (mac-sonoma) from baseline search path
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=273509

Reviewed by Jonathan Bedard.

Per policy, we put all current macOS baselines in `mac` rather than
`mac-sonoma`. Rather than relying on policy to enforce this, we should
just remove `mac-sonoma` from the baseline search path, therefore
meaning its baseline search path ends with `mac`.

We're not currently changing the baseline search path when
apple_additions exists, so if that defines a version name for current
macOS it will remain in the search path.

* Tools/Scripts/webkitpy/port/mac.py:
(MacPort.default_baseline_search_path):
* Tools/Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_sonoma_baseline_search_path):

Canonical link: https://commits.webkit.org/278241@main
  • Loading branch information
gsnedders committed May 2, 2024
1 parent 68ea654 commit 42db1be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
10 changes: 7 additions & 3 deletions Tools/Scripts/webkitpy/port/mac.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,13 @@ def default_baseline_search_path(self, **kwargs):

expectations = []
for version in versions_to_fallback:
version_name = version_name_map.to_name(version, platform=self.port_name)
if version_name:
standardized_version_name = version_name.lower().replace(' ', '')
if version == MacPort.CURRENT_VERSION:
version_name = None
else:
version_name = version_name_map.to_name(version, platform=self.port_name)
if version_name:
standardized_version_name = version_name.lower().replace(' ', '')

apple_name = None
if apple_additions():
apple_name = version_name_map.to_name(version, platform=self.port_name, table=INTERNAL_TABLE)
Expand Down
6 changes: 2 additions & 4 deletions Tools/Scripts/webkitpy/port/mac_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,8 @@ def test_layout_test_searchpath_with_apple_additions(self):

def test_sonoma_baseline_search_path(self):
search_path = self.make_port(port_name='macos-sonoma').default_baseline_search_path()
self.assertEqual(search_path[0], '/mock-checkout/LayoutTests/platform/mac-sonoma-wk1')
self.assertEqual(search_path[1], '/mock-checkout/LayoutTests/platform/mac-sonoma')
self.assertEqual(search_path[2], '/mock-checkout/LayoutTests/platform/mac-wk1')
self.assertEqual(search_path[3], '/mock-checkout/LayoutTests/platform/mac')
self.assertEqual(search_path[0], '/mock-checkout/LayoutTests/platform/mac-wk1')
self.assertEqual(search_path[1], '/mock-checkout/LayoutTests/platform/mac')

def test_factory_with_future_version(self):
port = self.make_port(options=MockOptions(webkit_test_runner=True), os_version=MacTest.FUTURE_VERSION, os_name='mac', port_name='mac')
Expand Down

0 comments on commit 42db1be

Please sign in to comment.