Changeset 90527 in webkit


Ignore:
Timestamp:
Jul 6, 2011 7:49:47 PM (13 years ago)
Author:
dpranke@chromium.org
Message:

2011-07-06 Dirk Pranke <dpranke@chromium.org>

nrwt: remove --use-apache from the command line
https://bugs.webkit.org/show_bug.cgi?id=63358

Reviewed by Adam Barth.

Re-land the fix in bug 63358 - the prior fix was flawed in that
we were trying to start the http server during check_sys_deps()
but not actually setting up the environment properly. This
broken prior to this change, but exposed by it, since the patch
changes the chromium port to call the base class's checks.

  • Scripts/webkitpy/common/system/executive.py:
  • Scripts/webkitpy/layout_tests/port/base.py:
  • Scripts/webkitpy/layout_tests/port/chromium.py:
  • Scripts/webkitpy/layout_tests/port/chromium_linux.py:
  • Scripts/webkitpy/layout_tests/port/chromium_win.py:
  • Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
  • Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
  • Scripts/webkitpy/layout_tests/port/port_testcase.py:
  • Scripts/webkitpy/layout_tests/run_webkit_tests.py:
Location:
trunk/Tools
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90526 r90527  
     12011-07-06  Dirk Pranke  <dpranke@chromium.org>
     2
     3        nrwt: remove --use-apache from the command line
     4        https://bugs.webkit.org/show_bug.cgi?id=63358
     5
     6        Reviewed by Adam Barth.
     7
     8        Re-land the fix in bug 63358 - the prior fix was flawed in that
     9        we were trying to start the http server during check_sys_deps()
     10        but not actually setting up the environment properly. This
     11        broken prior to this change, but exposed by it, since the patch
     12        changes the chromium port to call the base class's checks.
     13
     14        * Scripts/webkitpy/common/system/executive.py:
     15        * Scripts/webkitpy/layout_tests/port/base.py:
     16        * Scripts/webkitpy/layout_tests/port/chromium.py:
     17        * Scripts/webkitpy/layout_tests/port/chromium_linux.py:
     18        * Scripts/webkitpy/layout_tests/port/chromium_win.py:
     19        * Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py:
     20        * Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py:
     21        * Scripts/webkitpy/layout_tests/port/port_testcase.py:
     22        * Scripts/webkitpy/layout_tests/run_webkit_tests.py:
     23
    1242011-07-06  Adam Barth  <abarth@webkit.org>
    225
  • trunk/Tools/Scripts/webkitpy/common/system/executive.py

    r90016 r90527  
    400400                    args,
    401401                    cwd=None,
     402                    env=None,
    402403                    input=None,
    403404                    error_handler=None,
     
    419420                             stderr=stderr,
    420421                             cwd=cwd,
     422                             env=env,
    421423                             close_fds=self._should_close_fds())
    422424        output = process.communicate(string_to_communicate)[0]
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/base.py

    r90520 r90527  
    139139        self._multiprocessing_is_available = (multiprocessing is not None)
    140140        self._results_directory = None
    141         self.set_option_default('use_apache', self._default_to_apache())
    142141
    143142    def executive(self):
     
    226225
    227226    def check_httpd(self):
    228         if self.get_option('use_apache'):
     227        if self._uses_apache():
    229228            path = self._path_to_apache()
    230229        else:
     
    232231
    233232        try:
    234             return self._executive.run_command([path, "-v"], return_exit_code=True) == 0
     233            env = self.setup_environ_for_server()
     234            return self._executive.run_command([path, "-v"], env=env, return_exit_code=True) == 0
    235235        except OSError, e:
    236236            _log.error("No httpd found. Cannot run http tests.")
     
    662662        assert not self._http_server, 'Already running an http server.'
    663663
    664         if self.get_option('use_apache'):
     664        if self._uses_apache():
    665665            server = apache_http_server.LayoutTestApacheHttpd(self, self.results_directory())
    666666        else:
     
    851851        return self._config.build_directory(args[0])
    852852
    853     def _default_to_apache(self):
    854         """Override if the port should use LigHTTPd instead of Apache by default.
    855 
    856         Ports that override start_http_server() ignore this method."""
     853    def _uses_apache(self):
    857854        return True
    858855
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium.py

    • Property svn:executable set to *
    r90520 r90527  
    119119
    120120    def check_sys_deps(self, needs_http):
     121        result = super(ChromiumPort, self).check_sys_deps(needs_http)
     122
    121123        cmd = [self._path_to_driver(), '--check-layout-test-sys-deps']
    122124
     
    133135            _log.error(output)
    134136            return False
    135         return True
     137        return result
    136138
    137139    def check_image_diff(self, override_step=None, logging=True):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_linux.py

    r90514 r90527  
    9595    def check_build(self, needs_http):
    9696        result = chromium.ChromiumPort.check_build(self, needs_http)
    97         if needs_http:
    98             if self.get_option('use_apache'):
    99                 result = self._check_apache_install() and result
    100             else:
    101                 result = self._check_lighttpd_install() and result
    10297        result = self.check_wdiff() and result
    10398
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win.py

    r90514 r90527  
    5656class ChromiumWinPort(chromium.ChromiumPort):
    5757    """Chromium Win implementation of the Port class."""
     58
    5859    # FIXME: Figure out how to unify this with base.TestConfiguration.all_systems()?
    5960    SUPPORTED_VERSIONS = ('xp', 'vista', 'win7')
     
    130131        return self._filesystem.join(self.path_from_webkit_base(), 'Source', 'WebKit', 'chromium', *comps)
    131132
    132     def _default_to_apache(self):
     133    def _uses_apache(self):
    133134        return False
    134135
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/chromium_win_unittest.py

    r90514 r90527  
    5858    def _mock_path_from_chromium_base(self, *comps):
    5959        return self._port._filesystem.join("/chromium/src", *comps)
     60
     61    def test_uses_apache(self):
     62        port = self.make_port()
     63        if not port:
     64            return
     65
     66        self.assertFalse(port._uses_apache())
    6067
    6168    def test_setup_environ_for_server(self):
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/mock_drt_unittest.py

    r90520 r90527  
    4141
    4242from webkitpy.tool import mocktool
    43 mock_options = mocktool.MockOptions(use_apache=True,
    44                                     configuration='Release')
     43mock_options = mocktool.MockOptions(configuration='Release')
    4544
    4645
  • trunk/Tools/Scripts/webkitpy/layout_tests/port/port_testcase.py

    r90514 r90527  
    9090        self.assertTrue('--foo=baz' in cmd_line)
    9191
     92    def test_uses_apache(self):
     93        port = self.make_port()
     94        if not port:
     95            return
     96
     97        self.assertTrue(port._uses_apache())
     98
    9299    def assert_servers_are_down(self, host, ports):
    93100        for port in ports:
  • trunk/Tools/Scripts/webkitpy/layout_tests/run_webkit_tests.py

    r90526 r90527  
    147147    if options.pixel_tests is None:
    148148        options.pixel_tests = True
    149 
    150     if not options.use_apache:
    151         options.use_apache = sys.platform.startswith('linux') or sys.platform == 'darwin'
    152149
    153150    if not options.time_out_ms:
     
    376373        optparse.make_option("--force", action="store_true", default=False,
    377374            help="Run all tests, even those marked SKIP in the test list"),
    378         optparse.make_option("--use-apache", action="store_true",
    379             default=False, help="Whether to use apache instead of lighttpd."),
    380375        optparse.make_option("--time-out-ms",
    381376            help="Set the timeout for each test"),
Note: See TracChangeset for help on using the changeset viewer.