Bug 228758

Summary: [webkitpy] Handle case where no existing simulators are defined
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, dewei_zhu, ews-watchlist, glenn, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ews-feeder: commit-queue-

Description Jonathan Bedard 2021-08-03 15:34:45 PDT
We need to handle the case where a machine has no existing simulated devices.
Comment 1 Radar WebKit Bug Importer 2021-08-03 15:35:41 PDT
<rdar://problem/81484040>
Comment 2 Jonathan Bedard 2021-08-03 15:38:51 PDT
Created attachment 434866 [details]
Patch
Comment 3 Jonathan Bedard 2021-08-03 16:25:23 PDT
The important piece to understand with this change is that comparing device types is fuzzy. Ie, `iPhone running iOS` matches `iPhone 10 running iOS 14`, but not `iPad running iOS`. Many scripts, and run-api-tests, in particular, don't exactly define exact device types and instead rely on the devices available on a machine. This is where the current issue is. If no devices are available, we don't have anything to match against and end up with a device type too generic for actually running tests. The solution to this (as implemented in this patch) is to check all device types this machine declares, even if those types are not currently associated with a simulated device, from newest to oldest, picking the first one that matches the requested device type.
Comment 4 EWS 2021-08-03 16:40:17 PDT
Committed r280622 (240235@main): <https://commits.webkit.org/240235@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434866 [details].