Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[webkitcorepy] Add generic test runner #15243

Conversation

JonWBedard
Copy link
Member

@JonWBedard JonWBedard commented Jun 23, 2023

41ea5f4

[webkitcorepy] Add generic test runner
https://bugs.webkit.org/show_bug.cgi?id=258464
rdar://111220802

Reviewed by Aakash Jain.

* Tools/Scripts/libraries/webkitcorepy/run-tests: Added.
* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:
(Terminal.size): Compute size of current terminal.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing/__init__.py: Added.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing/path_test_case.py:
Renamed from Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing.py.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing/python_test_runner.py: Added.
(PythonTestRunner.recurse): List all tests in a suite.
(PythonTestRunner.__init__): Discover all tests in provided modules.
(PythonTestRunner.tests): List all tests to be run, given a set of arguments.
(PythonTestRunner.run_test): Attempt to run a test with a name.
(PythonTestRunner.id): Convert a test to a name.
(PythonTestRunner.run): Trigger autoinstall before running tests.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing/test_runner.py: Added.
(TestRunner.combine): Combine two test result objects.
(TestRunner.__init__):
(TestRunner.tests): Subclass to implement.
(TestRunner.run_test): Ditto.
(TestRunner.id): Pass-through unless subclass implements.
(TestRunner.run): Run all tests.
(TestRunner.main): Parse arguments and run tests.

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

157843d

Misc iOS, tvOS & watchOS macOS Linux Windows
❌ πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug   πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2   πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ webkitpy   πŸ§ͺ ios-wk2-wpt   πŸ§ͺ mac-wk1   πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios   πŸ§ͺ mac-wk2   πŸ§ͺ api-gtk
  πŸ›  tv   πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ§ͺ services βœ… πŸ›  tv-sim
βœ… πŸ›  watch
βœ… πŸ›  πŸ§ͺ unsafe-merge   πŸ›  watch-sim

@JonWBedard JonWBedard self-assigned this Jun 23, 2023
@JonWBedard JonWBedard added the Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases label Jun 23, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 23, 2023
@JonWBedard JonWBedard removed the merging-blocked Applied to prevent a change from being merged label Jun 23, 2023
@JonWBedard JonWBedard force-pushed the eng/webkitcorepy-Add-generic-test-runner branch from 4d06808 to 576b630 Compare June 24, 2023 03:54
Copy link
Member

@aj062 aj062 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rs=me

@JonWBedard JonWBedard force-pushed the eng/webkitcorepy-Add-generic-test-runner branch from 576b630 to 157843d Compare June 26, 2023 16:50
@JonWBedard JonWBedard added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 26, 2023
https://bugs.webkit.org/show_bug.cgi?id=258464
rdar://111220802

Reviewed by Aakash Jain.

* Tools/Scripts/libraries/webkitcorepy/run-tests: Added.
* Tools/Scripts/libraries/webkitcorepy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/terminal.py:
(Terminal.size): Compute size of current terminal.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing/__init__.py: Added.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing/path_test_case.py:
Renamed from Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing.py.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing/python_test_runner.py: Added.
(PythonTestRunner.recurse): List all tests in a suite.
(PythonTestRunner.__init__): Discover all tests in provided modules.
(PythonTestRunner.tests): List all tests to be run, given a set of arguments.
(PythonTestRunner.run_test): Attempt to run a test with a name.
(PythonTestRunner.id): Convert a test to a name.
(PythonTestRunner.run): Trigger autoinstall before running tests.
* Tools/Scripts/libraries/webkitcorepy/webkitcorepy/testing/test_runner.py: Added.
(TestRunner.combine): Combine two test result objects.
(TestRunner.__init__):
(TestRunner.tests): Subclass to implement.
(TestRunner.run_test): Ditto.
(TestRunner.id): Pass-through unless subclass implements.
(TestRunner.run): Run all tests.
(TestRunner.main): Parse arguments and run tests.

Canonical link: https://commits.webkit.org/265519@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/webkitcorepy-Add-generic-test-runner branch from 157843d to 41ea5f4 Compare June 26, 2023 17:10
@webkit-commit-queue webkit-commit-queue merged commit 41ea5f4 into WebKit:main Jun 26, 2023
@webkit-commit-queue
Copy link
Collaborator

Committed 265519@main (41ea5f4): https://commits.webkit.org/265519@main

Reviewed commits have been landed. Closing PR #15243 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 26, 2023
@JonWBedard JonWBedard deleted the eng/webkitcorepy-Add-generic-test-runner branch June 27, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases
Projects
None yet
5 participants