NEW 103827
webkitpy: split the test-handling code out of the Port class into a new module
https://bugs.webkit.org/show_bug.cgi?id=103827
Summary webkitpy: split the test-handling code out of the Port class into a new module
Dirk Pranke
Reported 2012-12-01 17:55:18 PST
Right now there's a lot of logic in the base Port class for mapping test names onto baselines, expected results, etc. . This was originally done to stop clients from assuming that they could just read the filesystem directly to figure out what they wanted, and to make it easier to write tests for various features. I think that this was a good idea at the time and has helped enforce good layering in the other webkitpy.layout_test code. Call this collection of functionality a "TestDatabase". However, none of the other Port classes (except for the TestPort) really override any of this logic, and it greatly obfuscates what really varies between port to port. I think splitting this stuff out into a separate module would go a long way to making the Port objects more configuration-like and less god-like. I think that we should probably just provide a way to obtain a TestDatabase from a Port, and then have callers manipulate the database object directly (and the TestPort could provide a MockTestDatabase or some such thing). This should be straightforward and just involve bridging code via delegates and wrappers until callers can be updated.
Attachments
Note You need to log in before you can comment on or make changes to this bug.