<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>75037</bug_id>
          
          <creation_ts>2011-12-21 14:30:51 -0800</creation_ts>
          <short_desc>META: clean up port creation in webkitpy.layout_tests</short_desc>
          <delta_ts>2012-08-08 16:48:23 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>NRWT</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>76474</dependson>
    
    <dependson>75590</dependson>
    
    <dependson>75764</dependson>
    
    <dependson>76016</dependson>
    
    <dependson>76084</dependson>
    
    <dependson>76123</dependson>
    
    <dependson>76215</dependson>
    
    <dependson>76475</dependson>
          <blocked>71403</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Dirk Pranke">dpranke</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>abarth</cc>
    
    <cc>eric</cc>
    
    <cc>ojan</cc>
    
    <cc>rakuco</cc>
    
    <cc>tony</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>525603</commentid>
    <comment_count>0</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2011-12-21 14:30:51 -0800</bug_when>
    <thetext>Right now there&apos;s too much logic for creating different types of Port objects in webkitpy, and it&apos;s scattered across too many different places. We should clean this up.

Roughly, I think the functionality that is needed is:

1) create the &quot;right&quot; 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 &quot;right&quot; 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&apos;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&apos;s no apple port built).

Things that I think we probably don&apos;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 -&gt; no more logic in the constructors will be left

I&apos;m going to start working on this as written, but let me know if anyone has any thoughts on this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>535181</commentid>
    <comment_count>1</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-01-12 14:38:50 -0800</bug_when>
    <thetext>final (?) patch posted in bug 76215.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>669683</commentid>
    <comment_count>2</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-07-13 19:30:21 -0700</bug_when>
    <thetext>resetting the owner in case someone else wants to take a look, as these bugs aren&apos;t on my immediate to-do list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>690922</commentid>
    <comment_count>3</comment_count>
    <who name="Dirk Pranke">dpranke</who>
    <bug_when>2012-08-08 16:48:23 -0700</bug_when>
    <thetext>I think this is as cleaned up as it&apos;s likely to get for a while. If people have other specific enhancements they&apos;d like to see we should file separate bugs for them.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>