Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1076)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux.py

Issue 2829123002: Save and restore DISPLAY so that results.html can be shown. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 da1121b75800853d9c201513f69397a5be9d5a5d..9147c2ccdadea819aa98528973f160c6b854e8cd 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
@@ -65,6 +65,7 @@ class LinuxPort(base.Port):
if not self.get_option('disable_breakpad'):
self._dump_reader = DumpReaderLinux(host, self._build_path())
self._original_home = None
+ self._original_display = None
self._xvfb_process = None
def additional_driver_flag(self):
@@ -159,6 +160,7 @@ class LinuxPort(base.Port):
# By setting DISPLAY here, the individual worker processes will
# get the right DISPLAY. Note, if this environment could be passed
# when creating workers, then we wouldn't need to modify DISPLAY here.
+ 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:
@@ -178,12 +180,15 @@ class LinuxPort(base.Port):
return None
def _stop_xvfb(self):
+ if self._original_display:
+ self.host.environ['DISPLAY'] = self._original_display
if not self._xvfb_process:
return
_log.debug('Killing Xvfb process pid %d.', self._xvfb_process.pid)
self._xvfb_process.kill()
self._xvfb_process.wait()
+
def _path_to_driver(self, target=None):
binary_name = self.driver_name()
return self._build_path_with_target(target, binary_name)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698