Bug 170186 - webkitpy: Add target host concept
Summary: webkitpy: Add target host concept
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-03-28 10:59 PDT by Jonathan Bedard
Modified: 2017-03-31 17:24 PDT (History)
6 users (show)

See Also:


Attachments
Patch (16.53 KB, patch)
2017-03-28 11:01 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (17.02 KB, patch)
2017-03-28 14:16 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (25.79 KB, patch)
2017-03-29 13:30 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (26.73 KB, patch)
2017-03-30 15:48 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (27.73 KB, patch)
2017-03-31 10:11 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (28.94 KB, patch)
2017-03-31 14:18 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (29.74 KB, patch)
2017-03-31 15:07 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (29.49 KB, patch)
2017-03-31 16:42 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2017-03-28 10:59:31 PDT
A target host concept will allow tests to be run on different hosts than the machine driving the test suite.  This target host would be accessed from the port class by the driver, allowing drivers to run layout tests on a remote host.
Comment 1 Jonathan Bedard 2017-03-28 11:01:08 PDT
Created attachment 305605 [details]
Patch
Comment 2 Radar WebKit Bug Importer 2017-03-28 11:01:15 PDT
<rdar://problem/31301797>
Comment 3 Jonathan Bedard 2017-03-28 14:16:54 PDT
Created attachment 305640 [details]
Patch
Comment 4 Alexey Proskuryakov 2017-03-28 16:53:24 PDT
Comment on attachment 305640 [details]
Patch

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

I'd like to better understand the difference between "host", "device" and "port". Perhaps the code could be more clear about these.

Looks good overall, please address the comments about the Port class member functions with unused arguments.

> Tools/Scripts/webkitpy/port/base.py:809
> -    def abspath_for_test(self, test_name):
> +    def abspath_for_test(self, test_name, target_host=None):

It would be cleaner to implement the functionality for non-None target host here, not in subclasses. As it is, the signature misleads the reader into believing that passing a target_host is always supported.

> Tools/Scripts/webkitpy/port/base.py:1277
> +    def _driver_tempdir(self, target_host=None):

Ditto.

> Tools/Scripts/webkitpy/port/base.py:1349
> +    def sample_process(self, name, pid, target_host=None):

Ditto.

> Tools/Scripts/webkitpy/port/darwin.py:125
> +    def sample_process(self, name, pid, target_host=None):

Ditto.

> Tools/Scripts/webkitpy/port/ios.py:79
> +    # Devices are the target host

Please add the sentence with a period.

Is it right that multiple "devices" are a singular "host"?
Comment 5 Jonathan Bedard 2017-03-29 13:30:32 PDT
Created attachment 305778 [details]
Patch
Comment 6 Jonathan Bedard 2017-03-30 15:48:33 PDT
Created attachment 305916 [details]
Patch
Comment 7 Jonathan Bedard 2017-03-31 10:11:40 PDT
Created attachment 305981 [details]
Patch
Comment 8 Alexey Proskuryakov 2017-03-31 13:31:34 PDT
Comment on attachment 305981 [details]
Patch

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

> Tools/Scripts/webkitpy/common/system/filesystem.py:315
> +        """Returns a path from the base host localized for this host.  By default,

Please don't use French spaces.

> Tools/Scripts/webkitpy/common/system/filesystem.py:320
> +        """Moves a file from this host to the base host.  Be default, this host

Ditto. Typo: Be default.

It may be better to have a copy operation, as move can't be atomic in he general case anyway. As far as I understand, we don't need to copy or move for Simulator much anyway.

> Tools/Scripts/webkitpy/common/system/filesystem.py:325
> +        """Moves a file from the base host to this host.  Be default, this host

Ditto.

> Tools/Scripts/webkitpy/port/darwin.py:157
> +    def sample_file_path(self, name, pid, dir):

dir -> directory

> Tools/Scripts/webkitpy/port/darwin.py:160
> +    def spindump_file_path(self, name, pid, dir):

Ditto.
Comment 9 Jonathan Bedard 2017-03-31 14:18:06 PDT
Created attachment 306010 [details]
Patch
Comment 10 Jonathan Bedard 2017-03-31 15:07:38 PDT
Created attachment 306017 [details]
Patch
Comment 11 Jonathan Bedard 2017-03-31 16:42:55 PDT
Created attachment 306026 [details]
Patch for landing
Comment 12 WebKit Commit Bot 2017-03-31 17:24:51 PDT
Comment on attachment 306026 [details]
Patch for landing

Clearing flags on attachment: 306026

Committed r214705: <http://trac.webkit.org/changeset/214705>
Comment 13 WebKit Commit Bot 2017-03-31 17:24:53 PDT
All reviewed patches have been landed.  Closing bug.