| Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py
|
| diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py
|
| index d0c6bbd325e86c278c582898714ffe473bc9d302..2bb6eff0be3ebb25d70b51a07fdc379ca7ac7a6f 100644
|
| --- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py
|
| +++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py
|
| @@ -154,7 +154,7 @@ class LinuxPort(base.Port):
|
| def _start_xvfb(self):
|
| display = self._find_display()
|
| if not display:
|
| - _log.warn('Failed to find a free display to start Xvfb.')
|
| + _log.critical('Failed to find a free display to start Xvfb.')
|
| return
|
|
|
| _log.info('Starting Xvfb with display "%s".', display)
|
| @@ -170,14 +170,11 @@ class LinuxPort(base.Port):
|
| self._original_display = self.host.environ.get('DISPLAY')
|
| self.host.environ['DISPLAY'] = display
|
|
|
| - # The poll() method will return None if the process has not terminated:
|
| + # Check that xvfb has started correctly via probing using xdpyinfo.
|
| + # While xvfb is running, the poll() method will return None;
|
| # https://docs.python.org/2/library/subprocess.html#subprocess.Popen.poll
|
| - if self._xvfb_process.poll() is not None:
|
| - _log.warn('Failed to start Xvfb on display "%s."', display)
|
| - self._stop_xvfb()
|
| -
|
| start_time = self.host.time()
|
| - while self.host.time() - start_time < self.XVFB_START_TIMEOUT:
|
| + while self.host.time() - start_time < self.XVFB_START_TIMEOUT or self._xvfb_process.poll() is not None:
|
| # We don't explicitly set the display, as we want to check the
|
| # environment value.
|
| exit_code = self.host.executive.run_command(
|
| @@ -187,8 +184,10 @@ class LinuxPort(base.Port):
|
| return
|
| _log.warn('xdpyinfo check failed with exit code %s while starting Xvfb on "%s".', exit_code, display)
|
| self.host.sleep(0.1)
|
| - _log.fatal('Failed to start Xvfb on display "%s" (xdpyinfo check failed).', display)
|
| +
|
| + retcode = self._xvfb_process.poll()
|
| self._stop_xvfb()
|
| + _log.critical('Failed to start Xvfb on display "%s" (xvfb retcode: %r).', display, retcode)
|
|
|
| def _find_display(self):
|
| """Tries to find a free X display, looping if necessary."""
|
|
|