Bug 133963 - Add knowledge of the iOS Simulator to webkitpy
Summary: Add knowledge of the iOS Simulator to webkitpy
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: iPhone / iPad iOS 7.0
: P2 Normal
Assignee: David Farler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-16 19:09 PDT by Simon Fraser (smfr)
Modified: 2014-07-29 21:49 PDT (History)
6 users (show)

See Also:


Attachments
Patch (17.64 KB, patch)
2014-06-16 19:13 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (20.92 KB, patch)
2014-07-24 17:34 PDT, David Farler
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2014-06-16 19:09:43 PDT
Add knowledge of the iOS Simulator to webkitpy
Comment 1 Simon Fraser (smfr) 2014-06-16 19:13:07 PDT
Created attachment 233206 [details]
Patch
Comment 2 WebKit Commit Bot 2014-06-16 19:13:57 PDT
Attachment 233206 [details] did not pass style-queue:


ERROR: Tools/Scripts/webkitpy/port/ios-simulator.py:88:  no spaces around keyword / parameter equals  [pep8/E251] [5]
ERROR: Tools/Scripts/webkitpy/port/ios-simulator.py:122:  multiple statements on one line (semicolon)  [pep8/E702] [5]
Total errors found: 2 in 4 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Brent Fulgham 2014-07-22 11:54:05 PDT
Comment on attachment 233206 [details]
Patch

I think this looks good, but perhaps Ryosuke should review.
Comment 4 Simon Fraser (smfr) 2014-07-22 12:06:39 PDT
David Farler should also say whether this will be useful to him.
Comment 5 David Farler 2014-07-22 12:15:22 PDT
Here's some feedback based on the simulator relay app I'm working on:

You can just use "LayoutTestRelay" as the driver for both DRT and WKTR.

--app
I've been using --app /path/to/DRTorWKTR.app which I install with CoreSimulator.

--suffix
In order to support multiple copies of the dump tool running simultaneously, they need to have a unique bundle identifier. LayoutTestRelay can handle this but it needs to have a suffix passed to it so it knows how to unique the identifier (LayoutTestRelay and DRT/WKTR instances are 1:1). I've been using --suffix {1..N} depending on how many instances are passed in as the option.

--product-dir
To set DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH when launching in the simulator. I can also just pick these up from the environment.

--A way to specify the device type.
CoreSimulator spawns devices as (SimDeviceType, SimRuntime) -> SimDevice. For any device type, I'll have to do a check to see if the device and runtime are compatible, since you can have more than one simulator runtime in an Xcode.app bundle. They are identified by reverse-DNS style identifiers. It would be easiest to provide both --deviceType <identifier> --runtime <identifier> to the relay app, where I can do a quick check and bail if the combination is invalid.

Simulator device types roughly correspond to iOS hardware models, and simulator runtimes correspond roughly to simulator SDK versions.
Comment 6 David Farler 2014-07-24 16:37:53 PDT
Yoink.
Comment 7 David Farler 2014-07-24 16:39:24 PDT
Comment on attachment 233206 [details]
Patch

Got a bunch more changes on top of this. Will upload another patch.
Comment 8 David Farler 2014-07-24 17:34:59 PDT
Created attachment 235481 [details]
Patch
Comment 9 Simon Fraser (smfr) 2014-07-24 17:40:35 PDT
Comment on attachment 235481 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=235481&action=review

> Tools/ChangeLog:16
> +        * Scripts/webkitpy/port/ios.py: Added.

can we call this iossimulator.py ?

> Tools/Scripts/webkitpy/port/ios.py:50
> +    ARCHITECTURES = ['x86_64', 'x86']

We should probably support 32-bit too.
Comment 10 David Farler 2014-07-24 18:36:46 PDT
(In reply to comment #9)
> (From update of attachment 235481 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=235481&action=review
> 
> > Tools/ChangeLog:16
> > +        * Scripts/webkitpy/port/ios.py: Added.
> 
> can we call this iossimulator.py ?

We can, but I was just going to put the simulator and device support (when that is ready) in the same module, since they will both run in more or less the same way. Eventually we will have an IOSDevicePort and it makes sense for them to be in the same Python module.

> 
> > Tools/Scripts/webkitpy/port/ios.py:50
> > +    ARCHITECTURES = ['x86_64', 'x86']
> 
> We should probably support 32-bit too.

Ah, I copied this from the Mac, I assumed that’s what ‘x86’ was. It looks like x86 is webkitpy-speak for i386:

mac.py:72:def _build_driver_flags(self):
return ['ARCHS=i386'] if self.architecture() == 'x86' else []
Comment 11 David Farler 2014-07-29 21:49:50 PDT
Committed r171789: <http://trac.webkit.org/changeset/171789>