Changeset 130083 in webkit
- Timestamp:
- Oct 1, 2012, 3:22:00 PM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r130078 r130083 1 2012-10-01 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com> 2 3 webkitpy should accept a different httpd.conf specified by the user 4 https://bugs.webkit.org/show_bug.cgi?id=98071 5 6 Reviewed by Dirk Pranke. 7 8 The existing httpd.conf variants (or lighttpd.conf, for that 9 matter) we have do not always suit the user's system. This is 10 particularly true on Linux/Unix, where Apache can be installed in 11 a plethora of ways and the LoadModule calls can fail to specify 12 the proper module paths. 13 14 For now, we start accepting the WEBKIT_HTTP_SERVER_CONF_PATH 15 environment variable, which allows the user to specify the 16 absolute path to another http server configuration file that might 17 work on the user's system. 18 19 In the long term, we should try to generate our configuration file 20 and stop requiring all the different httpd.conf files we have as 21 well as this hack. 22 23 * Scripts/webkitpy/layout_tests/port/base.py: 24 (Port._path_to_apache_config_file): 25 * Scripts/webkitpy/layout_tests/port/port_testcase.py: 26 (test_path_to_apache_config_file): 27 1 28 2012-10-01 Emil A Eklund <eae@chromium.org> 2 29 -
trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py
r130065 r130083 1166 1166 1167 1167 def _path_to_apache_config_file(self): 1168 """Returns the full path to the apache binary. 1168 """Returns the full path to the apache configuration file. 1169 1170 If the WEBKIT_HTTP_SERVER_CONF_PATH environment variable is set, its 1171 contents will be used instead. 1169 1172 1170 1173 This is needed only by ports that use the apache_http_server module.""" 1174 config_file_from_env = os.environ.get('WEBKIT_HTTP_SERVER_CONF_PATH') 1175 if config_file_from_env: 1176 if not self._filesystem.exists(config_file_from_env): 1177 raise IOError('%s was not found on the system' % config_file_from_env) 1178 return config_file_from_env 1179 1171 1180 config_file_name = self._apache_config_file_name_for_platform(sys.platform) 1172 1181 return self._filesystem.join(self.layout_tests_dir(), 'http', 'conf', config_file_name) -
trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py
r129047 r130083 31 31 import errno 32 32 import logging 33 import os 33 34 import socket 34 35 import sys … … 583 584 def test_path_to_apache_config_file(self): 584 585 port = TestWebKitPort() 586 587 saved_environ = os.environ.copy() 588 try: 589 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/path/to/httpd.conf' 590 self.assertRaises(IOError, port._path_to_apache_config_file) 591 port._filesystem.write_text_file('/existing/httpd.conf', 'Hello, world!') 592 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf' 593 self.assertEquals(port._path_to_apache_config_file(), '/existing/httpd.conf') 594 finally: 595 os.environ = saved_environ.copy() 596 585 597 # Mock out _apache_config_file_name_for_platform to ignore the passed sys.platform value. 586 598 port._apache_config_file_name_for_platform = lambda platform: 'httpd.conf' 587 599 self.assertEquals(port._path_to_apache_config_file(), '/mock-checkout/LayoutTests/http/conf/httpd.conf') 600 601 # Check that even if we mock out _apache_config_file_name, the environment variable takes precedence. 602 saved_environ = os.environ.copy() 603 try: 604 os.environ['WEBKIT_HTTP_SERVER_CONF_PATH'] = '/existing/httpd.conf' 605 self.assertEquals(port._path_to_apache_config_file(), '/existing/httpd.conf') 606 finally: 607 os.environ = saved_environ.copy() 588 608 589 609 def test_check_build(self):
Note:
See TracChangeset
for help on using the changeset viewer.