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..3e76cea94628ed12b153328399943da099c89ffe 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,24 @@ 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". |
+ # |
+ # Since altering this behavior requires an Xvfb patch or some deep |
+ # surgery, we instead opt to use the system "TEMPDIR" for this specific |
+ # process. |
mithro
2017/05/03 01:58:34
Don't need this second paragraph.
dnj
2017/05/03 03:36:36
Done.
|
+ # |
+ # See: crbug.com/715848 |
mithro
2017/05/03 01:58:34
https://crbug.com/XXXXX
dnj
2017/05/03 03:36:36
Done.
|
+ env = self.host.environ.copy() |
+ env['TEMPDIR'] = env['TMPDIR'] = '/tmp' |
mithro
2017/05/03 01:58:34
Can you log a warning if 'TEMPDIR' is set in the e
iannucci
2017/05/03 02:06:36
Actually... Why set TEMPDIR? That's only used on w
dnj
2017/05/03 03:36:36
I can - however, this will generally not be set on
dnj
2017/05/03 03:36:36
I was overriding everything I saw in the log vars,
|
+ |
_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 |