Modified: trunk/Tools/Scripts/webkitpy/port/xvfbdriver_unittest.py (182565 => 182566)
--- trunk/Tools/Scripts/webkitpy/port/xvfbdriver_unittest.py 2015-04-08 21:00:19 UTC (rev 182565)
+++ trunk/Tools/Scripts/webkitpy/port/xvfbdriver_unittest.py 2015-04-08 21:12:44 UTC (rev 182566)
@@ -68,49 +68,59 @@
def test_start_no_pixel_tests(self):
driver = self.make_driver()
- expected_logs = ("MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '1024x768x24', '-nolisten', 'tcp'], env=%s\n" % driver._environment)
- self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0")
+ expected_logs = ("MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':1', '-screen', '0', '1024x768x24', '-nolisten', 'tcp'], env=%s\n" % driver._environment)
+ self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":1")
self.cleanup_driver(driver)
def test_start_pixel_tests(self):
driver = self.make_driver()
- expected_logs = ("MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '1024x768x24', '-nolisten', 'tcp'], env=%s\n" % driver._environment)
- self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
+ expected_logs = ("MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':1', '-screen', '0', '1024x768x24', '-nolisten', 'tcp'], env=%s\n" % driver._environment)
+ self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":1", pixel_tests=True)
self.cleanup_driver(driver)
def test_start_arbitrary_worker_number(self):
driver = self.make_driver(worker_number=17)
- expected_logs = ("MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':0', '-screen', '0', '1024x768x24', '-nolisten', 'tcp'], env=%s\n" % driver._environment)
- self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
+ expected_logs = ("MOCK run_command: ['ps', '-eo', 'comm,command'], cwd=None\nMOCK popen: ['Xvfb', ':1', '-screen', '0', '1024x768x24', '-nolisten', 'tcp'], env=%s\n" % driver._environment)
+ self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":1", pixel_tests=True)
self.cleanup_driver(driver)
def test_next_free_display(self):
- output = "Xorg /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none\nXvfb Xvfb :1 -screen 0 800x600x24 -nolisten tcp"
+ output = "Xorg /usr/bin/X :1 -auth /var/run/lightdm/root/:1 -nolisten tcp vt7 -novtswitch -background none\nXvfb Xvfb :2 -screen 0 800x600x24 -nolisten tcp"
executive = MockExecutive2(output)
driver = self.make_driver(executive=executive)
+ self.assertEqual(driver._next_free_display(), 3)
+ self.cleanup_driver(driver)
+ output = "X /usr/bin/X :1 vt7 -nolisten tcp -auth /var/run/xauth/A:0-8p7Ybb"
+ executive = MockExecutive2(output)
+ driver = self.make_driver(executive=executive)
self.assertEqual(driver._next_free_display(), 2)
self.cleanup_driver(driver)
- output = "X /usr/bin/X :0 vt7 -nolisten tcp -auth /var/run/xauth/A:0-8p7Ybb"
+ output = "Xvfb Xvfb :1 -screen 0 800x600x24 -nolisten tcp"
executive = MockExecutive2(output)
driver = self.make_driver(executive=executive)
- self.assertEqual(driver._next_free_display(), 1)
+ self.assertEqual(driver._next_free_display(), 2)
self.cleanup_driver(driver)
- output = "Xvfb Xvfb :0 -screen 0 800x600x24 -nolisten tcp"
+ output = "Xvfb Xvfb :2 -screen 0 800x600x24 -nolisten tcp\nXvfb Xvfb :1 -screen 0 800x600x24 -nolisten tcp\nXvfb Xvfb :3 -screen 0 800x600x24 -nolisten tcp"
executive = MockExecutive2(output)
driver = self.make_driver(executive=executive)
- self.assertEqual(driver._next_free_display(), 1)
+ self.assertEqual(driver._next_free_display(), 4)
self.cleanup_driver(driver)
- output = "Xvfb Xvfb :1 -screen 0 800x600x24 -nolisten tcp\nXvfb Xvfb :0 -screen 0 800x600x24 -nolisten tcp\nXvfb Xvfb :3 -screen 0 800x600x24 -nolisten tcp"
+ output = "Xorg.bin /usr/libexec/Xorg.bin :1 -background none -noreset -verbose 3 -logfile /dev/null -auth /run/gdm/auth-for-gdm-Zt8Eq2/database -seat seat0 -nolisten tcp vt1"
executive = MockExecutive2(output)
driver = self.make_driver(executive=executive)
self.assertEqual(driver._next_free_display(), 2)
self.cleanup_driver(driver)
+ output = "/usr/libexec/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -nolisten tcp -background none -noreset -keeptty -verbose 3"
+ executive = MockExecutive2(output)
+ driver = self.make_driver(executive=executive)
+ self.assertEqual(driver._next_free_display(), 1)
+ self.cleanup_driver(driver)
def test_start_next_worker(self):
driver = self.make_driver()
- driver._next_free_display = lambda: 0
- expected_logs = ("MOCK popen: ['Xvfb', ':0', '-screen', '0', '1024x768x24', '-nolisten', 'tcp'], env=%s\n" % driver._environment)
- self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":0", pixel_tests=True)
+ driver._next_free_display = lambda: 1
+ expected_logs = ("MOCK popen: ['Xvfb', ':1', '-screen', '0', '1024x768x24', '-nolisten', 'tcp'], env=%s\n" % driver._environment)
+ self.assertDriverStartSuccessful(driver, expected_logs=expected_logs, expected_display=":1", pixel_tests=True)
self.cleanup_driver(driver)
driver = self.make_driver()
driver._next_free_display = lambda: 3