Changeset 250330 in webkit


Ignore:
Timestamp:
Sep 24, 2019, 8:15:35 PM (6 years ago)
Author:
Fujii Hironori
Message:

[Windows][webkitpy] _apache_config_file_name_for_platform should take the system PHP version into account
https://bugs.webkit.org/show_bug.cgi?id=202134

Reviewed by Jonathan Bedard.

Tools:

_apache_config_file_name_for_platform always returns a config file
name for PHP5 on Cygwin Python, one for PHP7 on Win32 Python. It
should detect the system PHP version as Linux ports do.

Both AppleWin and WinCairo are using XAMPP Apache. Unify the code
paths for them. And, remove a stale conf file.

This change makes it possible to use Cygwin Python with PHP7.

  • Scripts/webkitpy/port/base.py:

(Port._win_php_version): Added.
(Port._apache_config_file_name_for_platform): Unified cygwin and
win32 code path by using _win_php_version.

  • Scripts/webkitpy/port/port_testcase.py:

(test_apache_config_file_name_for_platform): Updated cygwin and
win32 test cases.

LayoutTests:

  • http/conf/cygwin-httpd.conf: Removed a stale conf file.
  • http/conf/win-httpd-2.4-php5.conf: Renamed from LayoutTests/http/conf/apache2.4-httpd-win.conf.
Location:
trunk
Files:
1 deleted
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r250324 r250330  
     12019-09-24  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Windows][webkitpy] _apache_config_file_name_for_platform should take the system PHP version into account
     4        https://bugs.webkit.org/show_bug.cgi?id=202134
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * http/conf/cygwin-httpd.conf: Removed a stale conf file.
     9        * http/conf/win-httpd-2.4-php5.conf: Renamed from LayoutTests/http/conf/apache2.4-httpd-win.conf.
     10
    1112019-09-24  Kate Cheney  <katherine_cheney@apple.com>
    212
  • trunk/Tools/ChangeLog

    r250327 r250330  
     12019-09-24  Fujii Hironori  <Hironori.Fujii@sony.com>
     2
     3        [Windows][webkitpy] _apache_config_file_name_for_platform should take the system PHP version into account
     4        https://bugs.webkit.org/show_bug.cgi?id=202134
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        _apache_config_file_name_for_platform always returns a config file
     9        name for PHP5 on Cygwin Python, one for PHP7 on Win32 Python. It
     10        should detect the system PHP version as Linux ports do.
     11
     12        Both AppleWin and WinCairo are using XAMPP Apache. Unify the code
     13        paths for them. And, remove a stale conf file.
     14
     15        This change makes it possible to use Cygwin Python with PHP7.
     16
     17        * Scripts/webkitpy/port/base.py:
     18        (Port._win_php_version): Added.
     19        (Port._apache_config_file_name_for_platform): Unified cygwin and
     20        win32 code path by using _win_php_version.
     21        * Scripts/webkitpy/port/port_testcase.py:
     22        (test_apache_config_file_name_for_platform): Updated cygwin and
     23        win32 test cases.
     24
    1252019-09-24  Matt Lewis  <jlewis3@apple.com>
    226
  • trunk/Tools/Scripts/webkitpy/port/base.py

    r250286 r250330  
    12891289        return ""
    12901290
     1291    def _win_php_version(self):
     1292        root = os.environ.get('XAMPP_ROOT', 'C:\\xampp')
     1293        prefix = self._filesystem.join(root, 'php')
     1294        for version in ('5', '7'):
     1295            conf = self._filesystem.join(prefix, "php{}ts.dll".format(version))
     1296            if self._filesystem.exists(conf):
     1297                return "-php{}".format(version)
     1298        _log.error("No php?ts.dll found in {}".format(prefix))
     1299        return ""
     1300
    12911301    # We pass sys_platform into this method to make it easy to unit test.
    12921302    def _apache_config_file_name_for_platform(self, sys_platform):
    1293         if sys_platform == 'cygwin':
    1294             return 'apache' + self._apache_version() + '-httpd-win.conf'
    1295         if sys_platform == 'win32':
    1296             return 'win-httpd-' + self._apache_version() + '-php7.conf'
     1303        if sys_platform in ['cygwin', 'win32']:
     1304            return 'win-httpd-' + self._apache_version() + self._win_php_version() + '.conf'
    12971305        if sys_platform == 'darwin':
    12981306            return 'apache' + self._apache_version() + self._darwin_php_version() + '-httpd.conf'
  • trunk/Tools/Scripts/webkitpy/port/port_testcase.py

    r246326 r250330  
    591591        port = TestWebKitPort()
    592592        port._apache_version = lambda: '2.2'
    593         self._assert_config_file_for_platform(port, 'cygwin', 'apache2.2-httpd-win.conf')
    594 
    595593        self._assert_config_file_for_platform(port, 'linux2', 'apache2.2-httpd.conf')
    596594        self._assert_config_file_for_platform(port, 'linux3', 'apache2.2-httpd.conf')
     595
     596        port._win_php_version = lambda: '-php7'
     597        self._assert_config_file_for_platform(port, 'cygwin', 'win-httpd-2.2-php7.conf')
     598        self._assert_config_file_for_platform(port, 'win32', 'win-httpd-2.2-php7.conf')
    597599
    598600        port._is_redhat_based = lambda: True
     
    606608
    607609        self._assert_config_file_for_platform(port, 'mac', 'apache2.2-httpd.conf')
    608         self._assert_config_file_for_platform(port, 'win32', 'win-httpd-2.2-php7.conf')  # WinCairo uses win32. Only AppleWin port uses cygwin.
    609610        self._assert_config_file_for_platform(port, 'barf', 'apache2.2-httpd.conf')
    610611
Note: See TracChangeset for help on using the changeset viewer.