You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Swift in WebKit] Integrate Swift Testing into run-api-tests (part 2)
https://bugs.webkit.org/show_bug.cgi?id=311769
rdar://174358586
Reviewed by NOBODY (OOPS!).
Adds the ability for `run-api-tests` to also include and run tests written with Swift Testing.
For now, this PR limits the scope to just those tests in `WKWebViewSwiftOverlayTests.swift` for
validation purposes; a subsequent PR will enable this for all the existing Swift Testing tests.
* Tools/Scripts/webkitpy/api_tests/manager.py:
(Manager._test_list_from_output):
(Manager._find_test_subset):
(Manager._collect_tests):
* Tools/Scripts/webkitpy/api_tests/runner.py:
(_Worker._run_single_test):
Modify the `run-api-tests` script to handle Swift Testing tests; specifically their different
naming scheme compared to gtest tests.
* Tools/Scripts/webkitpy/api_tests/manager_unittest.py:
(test_test_list_from_output_mixed_gtest_and_swift):
(test_find_test_subset_gtest_full_name):
(test_find_test_subset_gtest_suite_and_test):
(test_find_test_subset_gtest_binary_and_suite):
(test_find_test_subset_gtest_suite_only):
(test_find_test_subset_gtest_wildcard):
(test_find_test_subset_swift_full_name):
(test_find_test_subset_swift_suite_and_test):
(test_find_test_subset_swift_binary_and_suite):
(test_find_test_subset_swift_suite_only):
(test_find_test_subset_swift_wildcard):
(test_find_test_subset_parentheses_are_literal):
(test_find_test_subset_no_match):
Add new tests for the script.
* Tools/TestWebKitAPI/Configurations/TestIPC.xcconfig:
* Tools/TestWebKitAPI/Configurations/TestWGSL.xcconfig:
* Tools/TestWebKitAPI/Configurations/TestWTF.xcconfig:
* Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* Tools/TestWebKitAPI/Configurations/TestWebKitAPIBase.xcconfig:
Link Testing and update the LD_RUNPATH_SEARCH_PATHS as needed.
* Tools/TestWebKitAPI/Runner/GoogleTestsController.swift:
Drive-by cleanup: Make a function `private`
* Tools/TestWebKitAPI/Runner/SwiftTestingABI.swift: Added.
(__CommandLineArguments_v0.verbosity):
(__CommandLineArguments_v0.listTests):
(__CommandLineArguments_v0.filter):
(__CommandLineArguments_v0.skip):
(__CommandLineArguments_v0.repetitions):
(__CommandLineArguments_v0.parallel):
(ID.stringValue):
(ID.encode(to:)):
* Tools/TestWebKitAPI/Runner/SwiftTestsController.swift: Added.
(Storage.tests):
(Storage.events):
(saveRecord(_:)):
(writeOutputIfNeeded(_:)):
(handleRecord(_:)):
(run(with:)):
(SwiftTestingABI.canonicalizedRepresentation):
* Tools/TestWebKitAPI/Runner/TestWebKitAPI.swift:
(TestWebKitAPI.run):
* Tools/TestWebKitAPI/Runner/TestWebKitAPISupport.h:
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Add a new `TestRunner` type that is responsible for running Swift Testing types from within the
binary directly. This uses the Swift Testing ABI types and functions.
0 commit comments