Bug 170256

Summary: webkitpy: Pass dynamic libraries and frameworks to devices for install
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED INVALID    
Severity: Normal CC: ap, buildbot, dbates, glenn, lforschler, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Jonathan Bedard 2017-03-29 14:09:33 PDT
If a device is not based on the host machine running webkitpy, the dynamic libraries and frameworks needed for the driver to run need to be installed along with the app.  Pass these in an array to install_app.
Comment 1 Radar WebKit Bug Importer 2017-03-29 14:11:58 PDT
<rdar://problem/31329945>
Comment 2 Jonathan Bedard 2017-03-29 14:14:59 PDT
Created attachment 305786 [details]
Patch
Comment 3 Alexey Proskuryakov 2017-03-29 14:20:39 PDT
Comment on attachment 305786 [details]
Patch

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

> Tools/Scripts/webkitpy/port/ios.py:58
> +            'WebCore.framework',
> +            'JavaScriptCore.framework',
> +            'WebKit.framework',
> +            'WebKitLegacy.framework',
> +            'libWebCoreTestSupport.dylib',

This list will become a huge liability. In fact, I think that it's already missing the webrtc dylib.
Comment 4 Jonathan Bedard 2017-04-03 13:46:48 PDT
Created attachment 306103 [details]
Patch
Comment 5 Daniel Bates 2017-04-03 14:47:00 PDT
You did not address Alexey's remark on the liability of this approach in commen 3. You simply updated the patch to include the webrtc dylib that Alexey pointed out was missing. Please attempt another solution or explain why your proposed patch is the only solution or the best of the worst solutions.
Comment 6 Daniel Bates 2017-04-03 14:48:13 PDT
If you cannot think of another solution then ask
Comment 7 Jonathan Bedard 2017-04-03 15:30:58 PDT
(In reply to Daniel Bates from comment #6)
> If you cannot think of another solution then ask

I briefly discussed this with Alexey and Simon last week, although have yet to talk with them about this approach.

The trouble is, we don't have a list of dependent dynamic libraries anywhere in webkitpy.  Such a list would be an unfortunate burden to maintain, but the alternative solution would be to install every .framework and .dylib in the build directory, which would increase the amount of time and space taken up by an install (neither of which is trivial on devices).

The newer patch attempts to address the problem of the lack of a list of dependent dynamic libraries by making it clear that this is the responsibility of each port to maintain, if it is needed.

I'm still not convinced this is the best approach, if anyone has any other ideas.
Comment 8 Jonathan Bedard 2017-04-04 10:27:51 PDT
It turns out that just copying every framework and dylib in the build directory takes an extra 15 seconds, and that's only if binaries are not already there.  I think that's the best solution here.