Bug 193787 - [webkitdirs] iosSimulatorApplicationsPath may not have iOS.simruntime in its path
Summary: [webkitdirs] iosSimulatorApplicationsPath may not have iOS.simruntime in its ...
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: 2019-01-24 15:14 PST by Jonathan Bedard
Modified: 2019-01-24 16:36 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.67 KB, patch)
2019-01-24 15:22 PST, Jonathan Bedard
ap: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2019-01-24 15:14:33 PST
Make iosSimulatorApplicationsPath more flexible to accommodate different runtime directories.
Comment 1 Jonathan Bedard 2019-01-24 15:14:45 PST
<rdar://problem/47497634>
Comment 2 Jonathan Bedard 2019-01-24 15:22:03 PST
Created attachment 360042 [details]
Patch
Comment 3 Alexey Proskuryakov 2019-01-24 16:01:29 PST
Comment on attachment 360042 [details]
Patch

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

> Tools/ChangeLog:3
> +        [webkitdirs] iosSimulatorApplicationsPath may not have iOS.simruntime in it's path

s/it's/its/

> Tools/Scripts/webkitdirs.pm:2509
> +    my @runtimes = grep {!/^\./} readdir(RUNTIMES);

Maybe check for ".simruntime" in the name?

> Tools/Scripts/webkitdirs.pm:2511
> +    return File::Spec->catdir($runtimePath, @runtimes ? $runtimes[0] : "iOS.simruntime", "Contents", "Resources", "RuntimeRoot", "Applications");

I suggest adding a FIXME here. Building the path manually is fragile, and randomly picking a single runtime path is just weird. We need to find a way to determine which runtime corresponds to a simulator that we're about to use.
Comment 4 Jonathan Bedard 2019-01-24 16:35:21 PST
Committed r240455: <https://trac.webkit.org/changeset/240455>
Comment 5 Radar WebKit Bug Importer 2019-01-24 16:36:28 PST
<rdar://problem/47533806>