WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
75037
META: clean up port creation in webkitpy.layout_tests
https://bugs.webkit.org/show_bug.cgi?id=75037
Summary
META: clean up port creation in webkitpy.layout_tests
Dirk Pranke
Reported
2011-12-21 14:30:51 PST
Right now there's too much logic for creating different types of Port objects in webkitpy, and it's scattered across too many different places. We should clean this up. Roughly, I think the functionality that is needed is: 1) create the "right" port by default on a platform (e.g., running on Mac Lion gets you apple-mac-lion by default - needed for interactive use by devs) 2) create the "right" port for a given implementation on a platform (e.g., if you say --chromium on Mac Lion you get chromium-mac-lion by default - needed or interactive use by devs) 3) create a fully qualified port (--platform chromium-win-xp gets you a ChromiumWin port configured for XP baselines, regardless of what operating system you're running on - needed by rebaselining tools, other tools) And possibly also: 4) supporting --platform chromium-win (or --platform google-chrome-win) on windows (I think the chromium buildbots might use this, but it might be better to add a --google-chrome option to mirror the --chromium option instead) 5) pick a port that actually is built, even if it is not the default (so if I have a chromium checkout built on mac, it picks that up if there's no apple port built). Things that I think we probably don't need to support: a) --platform chromium-win on a non-windows port b) the cpu/gpu graphics type; I think the plan is to merge this into the regular chromium port, so this can go away Cleaning this up all at once would probably get messy, so I have a rough plan of attack: I. merge the get() routines in chromium_gpu.py and google_chrome.py into factory.py II. extract all of the port_name parsing logic out of the port constructors into separate staticmethods III. figure out if we can merge the staticmethods into factory.py and/or call them prior to constructing port objects IV. modify the Port objects to take a required, fully-qualified port_name in the constructor -> no more logic in the constructors will be left I'm going to start working on this as written, but let me know if anyone has any thoughts on this.
Attachments
Add attachment
proposed patch, testcase, etc.
Dirk Pranke
Comment 1
2012-01-12 14:38:50 PST
final (?) patch posted in
bug 76215
.
Dirk Pranke
Comment 2
2012-07-13 19:30:21 PDT
resetting the owner in case someone else wants to take a look, as these bugs aren't on my immediate to-do list.
Dirk Pranke
Comment 3
2012-08-08 16:48:23 PDT
I think this is as cleaned up as it's likely to get for a while. If people have other specific enhancements they'd like to see we should file separate bugs for them.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug