Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 51789d7a43f9da7230db866531064e8bac7f5fa4
https://github.com/WebKit/WebKit/commit/51789d7a43f9da7230db866531064e8bac7f5fa4
Author: Richard Robinson <[email protected]>
Date: 2026-04-04 (Sat, 04 Apr 2026)
Changed paths:
M Tools/Scripts/webkitpy/api_tests/manager.py
M Tools/Scripts/webkitpy/api_tests/runner.py
M Tools/TestWebKitAPI/CMakeLists.txt
A Tools/TestWebKitAPI/Runner/GoogleTestsController.swift
A Tools/TestWebKitAPI/Runner/TestRunner.swift
A Tools/TestWebKitAPI/Runner/TestWebKitAPI.swift
A Tools/TestWebKitAPI/Runner/TestWebKitAPISupport.h
A Tools/TestWebKitAPI/Runner/TestWebKitAPISupport.mm
A Tools/TestWebKitAPI/Runner/TestsController.cpp
A Tools/TestWebKitAPI/Runner/TestsController.h
M Tools/TestWebKitAPI/Sources.txt
M Tools/TestWebKitAPI/TestWebKitAPI-Bridging-Header.h
R Tools/TestWebKitAPI/TestWebKitAPI.swift
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
R Tools/TestWebKitAPI/TestWebKitAPISupport.h
R Tools/TestWebKitAPI/TestWebKitAPISupport.mm
R Tools/TestWebKitAPI/TestsController.cpp
R Tools/TestWebKitAPI/TestsController.h
M Tools/TestWebKitAPI/generic/main.cpp
M Tools/TestWebKitAPI/gtk/main.cpp
M Tools/TestWebKitAPI/playstation/main.cpp
M Tools/TestWebKitAPI/win/main.cpp
M Tools/TestWebKitAPI/wpe/WebKitTestMain.cpp
Log Message:
-----------
[Swift in WebKit] Refactor TestWebKitAPI to be agnostic about the test
runners it uses
https://bugs.webkit.org/show_bug.cgi?id=311440
rdar://174038164
Reviewed by Pascoe and Abrar Rahman Protyasha.
Work towards integrating Swift Testing into run-api-tests by refactoring the
TestWebKitAPI program
to no longer be gtest-specific and use agnostic CLI argument names.
* Tools/TestWebKitAPI/Runner/GoogleTestsController.swift: Added.
(GoogleTestsController.run(with:)):
(GoogleTestsController.parseArguments(_:)):
Add a type that conforms to the TestRunner protocol to handle GTest specific
tests and parses the
necessary arguments.
* Tools/TestWebKitAPI/Runner/TestRunner.swift: Added.
(TestRunner.run(with:)):
(TestRunner.option(_:for:)):
(TestRunner.flag(_:for:)):
Add a new protocol that different test runners can conform to, along with an
agnostic Configuration type
that parses the arguments given to the executable.
* Tools/TestWebKitAPI/Runner/TestWebKitAPI.swift: Renamed from
Tools/TestWebKitAPI/TestWebKitAPI.swift.
(TestWebKitAPI.forceSiteIsolationForTesting):
(TestWebKitAPI.handleArguments(_:)):
(TestWebKitAPI.run):
(TestWebKitAPI.main):
* Tools/TestWebKitAPI/Runner/TestWebKitAPISupport.h: Renamed from
Tools/TestWebKitAPI/TestWebKitAPISupport.h.
* Tools/TestWebKitAPI/Runner/TestWebKitAPISupport.mm: Renamed from
Tools/TestWebKitAPI/TestWebKitAPISupport.mm.
(TestWebKitAPIEnableAllSDKAlignedBehaviors):
(TestWebKitAPIRunTests):
* Tools/TestWebKitAPI/Runner/TestsController.cpp: Renamed from
Tools/TestWebKitAPI/TestsController.cpp.
(TestWebKitAPI::Printer::OnTestPartResult):
(TestWebKitAPI::Printer::OnTestEnd):
(TestWebKitAPI::TestsController::singleton):
(TestWebKitAPI::TestsController::TestsController):
(TestWebKitAPI::TestsController::run):
* Tools/TestWebKitAPI/Runner/TestsController.h: Renamed from
Tools/TestWebKitAPI/TestsController.h.
* Tools/TestWebKitAPI/Sources.txt:
* Tools/TestWebKitAPI/TestWebKitAPI-Bridging-Header.h:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Move some files to a new `Runner` subdirectory.
Canonical link: https://commits.webkit.org/310579@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications