Bug 214101

Summary: [Windows] Fix errors from calls to uname when not available
Product: WebKit Reporter: Stephan Szabo <stephan.szabo>
Component: Tools / TestsAssignee: Stephan Szabo <stephan.szabo>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, ews-watchlist, glenn, jbedard, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
darin: review+
Patch none

Description Stephan Szabo 2020-07-08 15:20:40 PDT
uname is not something guaranteed available for Windows. Recent updates for calling uname have appeared to cause errors or warnings for commands (build-webkit, check-webkit-style, etc) when used from non-posix shells (like powershell or cmd).
Comment 1 Stephan Szabo 2020-07-08 15:49:05 PDT
Created attachment 403812 [details]
Patch
Comment 2 Darin Adler 2020-07-08 16:25:39 PDT
Comment on attachment 403812 [details]
Patch

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

Seems OK

> Tools/Scripts/webkitdirs.pm:365
> -        $output = `uname -m`;
> +        if (!isWindows()) {
> +            $output = `uname -m`;
> +        }

In Perl we would idiomatically write this:

    $output = `uname -m` unless isWindows();

> Tools/Scripts/webkitdirs.pm:369
> +    chomp $output if (defined $output);

No need for those parentheses.
Comment 3 Stephan Szabo 2020-07-08 16:35:50 PDT
Created attachment 403818 [details]
Patch
Comment 4 EWS 2020-07-08 17:14:46 PDT
Committed r264142: <https://trac.webkit.org/changeset/264142>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 403818 [details].
Comment 5 Radar WebKit Bug Importer 2020-07-08 17:15:14 PDT
<rdar://problem/65248364>