Bug 192158 - webkitpy: Unify device creation
Summary: webkitpy: Unify device creation
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: 2018-11-29 09:41 PST by Jonathan Bedard
Modified: 2018-11-29 13:58 PST (History)
7 users (show)

See Also:


Attachments
Patch (11.48 KB, patch)
2018-11-29 11:53 PST, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (11.48 KB, patch)
2018-11-29 13:25 PST, 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 2018-11-29 09:41:34 PST
The API for creating simulated devices and physical devices is identical. We should leverage this fact and create all devices in the DevicePort class.
Comment 1 Radar WebKit Bug Importer 2018-11-29 09:43:18 PST
<rdar://problem/46344757>
Comment 2 Jonathan Bedard 2018-11-29 11:53:47 PST
Created attachment 356031 [details]
Patch
Comment 3 Lucas Forschler 2018-11-29 12:15:15 PST
Comment on attachment 356031 [details]
Patch

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

lgtm with typo fix

> Tools/Scripts/webkitpy/port/device_port.py:130
> +            raise RuntimeError('Not enought connected devices for {} processes'.format(self.child_processes()))

nit: typo enough
Comment 4 Simon Fraser (smfr) 2018-11-29 12:38:50 PST
Comment on attachment 356031 [details]
Patch

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

>> Tools/Scripts/webkitpy/port/device_port.py:130
>> +            raise RuntimeError('Not enought connected devices for {} processes'.format(self.child_processes()))
> 
> nit: typo enough

That should read "too few connected devices". Can this error fire for simulators?
Comment 5 Jonathan Bedard 2018-11-29 12:52:16 PST
(In reply to Simon Fraser (smfr) from comment #4)
> Comment on attachment 356031 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=356031&action=review
> 
> >> Tools/Scripts/webkitpy/port/device_port.py:130
> >> +            raise RuntimeError('Not enought connected devices for {} processes'.format(self.child_processes()))
> > 
> > nit: typo enough
> 
> That should read "too few connected devices". Can this error fire for
> simulators?

No, it cannot. Simulators will boot enough devices to match the number specified.
Comment 6 Jonathan Bedard 2018-11-29 13:25:19 PST
Created attachment 356042 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2018-11-29 13:58:38 PST
Comment on attachment 356042 [details]
Patch for landing

Clearing flags on attachment: 356042

Committed r238694: <https://trac.webkit.org/changeset/238694>
Comment 8 WebKit Commit Bot 2018-11-29 13:58:39 PST
All reviewed patches have been landed.  Closing bug.