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

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

Issue 2859703002: webkitpy: Override TEMPDIR for Xvfb. (Closed)
Patch Set: comments 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 d0c6bbd325e86c278c582898714ffe473bc9d302..4ba6c63966721ed9c731a29a48ba7479c05f6eae 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
@@ -157,12 +157,22 @@ class LinuxPort(base.Port):
_log.warn('Failed to find a free display to start Xvfb.')
return
+ # Parts of Xvfb use a hard-coded "/tmp" for its temporary directory.
+ # This can cause a failure when those parts expect to hardlink against
+ # files that were created in "TEMPDIR" / "TMPDIR".
+ #
+ # See: https://crbug.com/715848
+ env = self.host.environ.copy()
+ if env.get('TMPDIR') and env['TMPDIR'] != '/tmp':
+ _log.info('Overriding TMPDIR to "/tmp" for Xvfb, was: %s', env['TMPDIR'])
Dirk Pranke 2017/05/03 20:26:06 Nit: use _log.debug() here.
+ env['TMPDIR'] = '/tmp'
+
_log.info('Starting Xvfb with display "%s".', display)
self._xvfb_stdout = tempfile.NamedTemporaryFile(delete=False)
self._xvfb_stderr = tempfile.NamedTemporaryFile(delete=False)
self._xvfb_process = self.host.executive.popen(
['Xvfb', display, '-screen', '0', '1280x800x24', '-ac', '-dpi', '96'],
- stdout=self._xvfb_stdout, stderr=self._xvfb_stderr)
+ stdout=self._xvfb_stdout, stderr=self._xvfb_stderr, env=env)
# By setting DISPLAY here, the individual worker processes will
# get the right DISPLAY. Note, if this environment could be passed
« 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