Bug 188039 - [LayoutTests][Win] Configure perl binary location for CGI execution.
Summary: [LayoutTests][Win] Configure perl binary location for CGI execution.
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-26 01:22 PDT by Basuke Suzuki
Modified: 2019-03-04 12:27 PST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Basuke Suzuki 2018-07-26 01:22:50 PDT
There are many CGIs used for http tests. It contains shbang line in it and usually point to /usr/bin/perl, which is not suitable for native Windows environment. PHP is more portable and I believe there's almost no case only Perl can handle some task. Let's convert'em one by one. This is the meta bug for that task.
Comment 1 Fujii Hironori 2018-07-26 03:39:33 PDT
AppleWin port is also using XAMPP Apache. I think just a mis-configuration.

There is a comment.

https://github.com/WebKit/webkit/blob/master/LayoutTests/http/conf/apache2.4-httpd-win.conf#L57

> # When using the above setting, specify the path to the Perl binary
> # using the registry keys below:
> # [HKEY_CLASSES_ROOT\.pl\Shell\ExecCGI\Command] @="c:\\PATH\TO\perl\\bin\\perl.exe"
> # HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command] @="c:\\PATH\TO\perl\\bin\\perl.exe"
Comment 2 Fujii Hironori 2018-07-26 03:40:59 PDT
There are some perl scripts in imported directory. I think it's not feasible to convert.


> imported/blink/http/tests/misc/resources/image-slow-out-of-viewport.pl
> imported/blink/http/tests/plugins/resources/mock-plugin-with-csp.pl
> imported/blink/http/tests/security/contentSecurityPolicy/resources/frame-ancestors.pl
> imported/blink/http/tests/security/contentSecurityPolicy/resources/frame-in-frame.pl
> imported/blink/http/tests/security/contentSecurityPolicy/resources/redirect.pl
> imported/blink/http/tests/security/contentSecurityPolicy/resources/test-csp-header.pl
> imported/blink/http/tests/security/contentSecurityPolicy/resources/xhr-redirect-not-allowed.pl
> imported/blink/http/tests/xmlhttprequest/resources/invalid-utf8-json.pl
Comment 3 Basuke Suzuki 2018-07-26 09:25:43 PDT
(In reply to Fujii Hironori from comment #1)
> AppleWin port is also using XAMPP Apache. I think just a mis-configuration.
> 
> There is a comment.
> 
> https://github.com/WebKit/webkit/blob/master/LayoutTests/http/conf/apache2.4-
> httpd-win.conf#L57
> 
> > # When using the above setting, specify the path to the Perl binary
> > # using the registry keys below:
> > # [HKEY_CLASSES_ROOT\.pl\Shell\ExecCGI\Command] @="c:\\PATH\TO\perl\\bin\\perl.exe"
> > # HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command] @="c:\\PATH\TO\perl\\bin\\perl.exe"

Oh, thank you for the info. This should be documented or showing warning in some where during the launching httpd.
Comment 4 Basuke Suzuki 2018-07-26 09:43:51 PDT
Renamed summary from : [LayoutTests] Convert CGI written in Perl to PHP.

On Windows, XAMPP is used for layout test. We can assume perl is installed in XAMPP directory.
Comment 5 Fujii Hironori 2018-07-27 02:04:31 PDT
You need to install xammp-perl for WinCairo Docker.
https://github.com/WebKitForWindows/powershell-webkit-dev/blob/master/WebKitDev/Functions/Install-Xampp.ps1#L34
Comment 6 Basuke Suzuki 2018-07-27 17:43:46 PDT
(In reply to Fujii Hironori from comment #5)
> You need to install xammp-perl for WinCairo Docker.
> https://github.com/WebKitForWindows/powershell-webkit-dev/blob/master/
> WebKitDev/Functions/Install-Xampp.ps1#L34

Right. Or make it configurable by env var. Or respect the predefined registry value.
Comment 7 Basuke Suzuki 2018-07-27 17:44:36 PDT
Some CGI put "-T" option in the shebang line. So is the registry value.
Comment 8 Basuke Suzuki 2018-08-09 22:06:07 PDT
These registry must be set for bots.
Comment 10 Don Olmstead 2019-03-04 12:27:09 PST
This was fixed in the build bot image for wincairo.