Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 141e123bffe5b5adc3b2899a467f8d2c14b6e696
      
https://github.com/WebKit/WebKit/commit/141e123bffe5b5adc3b2899a467f8d2c14b6e696
  Author: Brianna Fan <[email protected]>
  Date:   2025-09-19 (Fri, 19 Sep 2025)

  Changed paths:
    M Tools/Scripts/import-webdriver-tests
    M Tools/Scripts/webkitpy/w3c/common.py
    M Tools/Scripts/webkitpy/w3c/test_exporter.py
    M Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py
    M Tools/Scripts/webkitpy/w3c/test_importer.py
    M Tools/Scripts/webkitpy/w3c/test_importer_unittest.py
    M Tools/Scripts/webkitpy/w3c/wpt_runner.py
    M Tools/Scripts/webkitpy/w3c/wpt_runner_unittest.py

  Log Message:
  -----------
  [WPT import friction] We should use a well-known location for the wpt repo 
clone that is not inside WebKitBuild
https://bugs.webkit.org/show_bug.cgi?id=277279
rdar://132753363

Reviewed by Sam Sneddon and Tim Nguyen.

This PR changes the default location of the WPT clone to the same dir as the 
WebKit checkout.
  - For example, if your directory is  ~/WebKit, then we will create ~/wpt.

The import and export scripts will prompt you for a directory to clone WPT into 
if not specified.
This defaults to the location described above. Notably, the name will default 
to 'wpt' instead of 'web-platform-tests'!

* Tools/Scripts/import-webdriver-tests: Use WPTPaths.

* Tools/Scripts/webkitpy/w3c/common.py:
(WPTPaths): Remove 'w3c-tests' from the checkout path and use 'wpt'.
(WPTPaths.checkout_directory): Use the dir of webkit_base as the checkout 
directory dir.
(WPTPaths.default_wpt_checkout_path): Rename of wpt_checkout_path.
(WPTPaths.ensure_wpt_repository):
    - This method returns the location of the WPT repo and clones it if it 
doesn't exist.
    - If no directory is passed in, it will prompt the user.
    - If run in non-interactive mode, it will default to one level below Webkit.
(WPTPaths.wpt_checkout_path): Deleted.

* Tools/Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter.__init__):
(WebPlatformTestExporter._get_wpt_repository):
(WebPlatformTestExporter.do_export):
(parse_args):
(configure_logging): Use 'webkitpy.w3c' logger to pick up common.py logs.
(WebPlatformTestExporter._ensure_wpt_repository):

* Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest): Remove 'WebKitBuild' from the mock path.
(TestExporterTest.test_export):
(TestExporterTest.test_export_with_specific_branch):
(TestExporterTest.test_export_no_clean):
* Tools/Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.do_import):
    - NEW: If a source directory is passed in, we try to clone it if it doesn't 
exist.
    - Use WPTPaths.ensure_wpt_repository in interactive mode to clone and 
return the directory path.

* Tools/Scripts/webkitpy/w3c/test_importer_unittest.py:
    - Add FAKE_WPT_DIR = '/wpt' and replace old dir with this variable.
    - Remove test_checkout_directory since we're no longer using 
path_from_webkit_outputdir in common.py.
    - Remove all mentions of 'WebKitBuild'.
    - Add mock symlink to setup for each test.
    - Add 'wpt' and 'testharness.js' files to the mock filesystem to mimic WPT 
repo.

* Tools/Scripts/webkitpy/w3c/wpt_runner.py:
(WPTRunner.prepare_wpt_checkout): Use WPTPaths.checkout_directory to construct 
the directory.

* Tools/Scripts/webkitpy/w3c/wpt_runner_unittest.py: Add WPT_CHECKOUT_PATH and 
replace old paths.
(WPTRunnerTest.test_prepare_wpt_checkout):
(WPTRunnerTest.test_run):
(WPTRunnerTest.test_run_with_args):

Canonical link: https://commits.webkit.org/300244@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to