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

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

Issue 2859703002: webkitpy: Override TEMPDIR for Xvfb. (Closed)
Patch Set: todo comment Created 3 years, 7 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
Index: third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
index 9b96ae6bcf4cd0556fe96149d4518a1736d3cbcd..0855e084b5881c592eb0a741217ac4b809435e8e 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/layout_tests/port/linux_unittest.py
@@ -136,6 +136,30 @@ class LinuxPortTest(port_testcase.PortTestCase):
env = port.setup_environ_for_server()
self.assertEqual(env['DISPLAY'], ':99')
+ def test_setup_test_run_starts_xvfb_clears_tmpdir(self):
+ def run_command_fake(args):
+ if args[0] == 'xdpyinfo':
+ if '-display' in args:
+ return 1
+ return 0
+
+ port = self.make_port()
+ port.host.environ['TMPDIR'] = '/foo/bar'
+ port.host.executive = MockExecutive(
+ run_command_fn=run_command_fake)
+ port.setup_test_run()
+
+ self.assertEqual(
+ port.host.executive.calls,
+ [
+ ['xdpyinfo', '-display', ':99'],
+ ['Xvfb', ':99', '-screen', '0', '1280x800x24', '-ac', '-dpi', '96'],
+ ['xdpyinfo'],
+ ])
+ self.assertEqual(port.host.executive.full_calls[1].env.get('TMPDIR'), '/tmp')
+ env = port.setup_environ_for_server()
+ self.assertEqual(env['DISPLAY'], ':99')
+
def test_setup_test_runs_finds_free_display(self):
def run_command_fake(args):
if args[0] == 'xdpyinfo':

Powered by Google App Engine
This is Rietveld 408576698