Bug 228758 - [webkitpy] Handle case where no existing simulators are defined
Summary: [webkitpy] Handle case where no existing simulators are defined
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: 2021-08-03 15:34 PDT by Jonathan Bedard
Modified: 2021-08-03 19:14 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.27 KB, patch)
2021-08-03 15:38 PDT, Jonathan Bedard
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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].