[GTK] run-gtk-tests should use webkitpy.port.gtk and webkitpy.port.xvfbdriver
authorclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Aug 2016 16:32:32 +0000 (16:32 +0000)
committerclopez@igalia.com <clopez@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Aug 2016 16:32:32 +0000 (16:32 +0000)
commitd9fcc95bc09f1d7f9ce6cedbc3a32362acb90024
treea2c6fa7dd98ab907f0ba4c85cad7b86823c927fa
parenta83b63738c12d5abe4f218d8f38e8728f5e774b2
[GTK] run-gtk-tests should use webkitpy.port.gtk and webkitpy.port.xvfbdriver
https://bugs.webkit.org/show_bug.cgi?id=160736

Reviewed by Carlos Garcia Campos.

This plugs run-gtk-tests into the webkitpy testing infrastructure.
As a benefit of this, run-gtk-tests now can be executed over any of
the existing supported gtk test display servers (xvfb, weston-over-xvfb,
or native xorg). A new command line switch --wayland is added for
run-gtk-tests.

* Scripts/run-gtk-tests:
(TestRunner.__init__): Remove the --display command line switch, its not longer useful.
Add a --wayland command line switch.
(TestRunner._start_accessibility_daemons):
(TestRunner):
(TestRunner.__init__):
(TestRunner._run_xvfb): Deleted.
(TestRunner._create_driver):
(TestRunner._setup_testing_environment): Delete the environment variable definitions that
are now done by driver._setup_environ_for_test().
(TestRunner._tear_down_testing_environment):
* Scripts/webkitpy/port/driver.py:
(Driver.__init__): Define self._server_name in the constructor of the base class.
It is used by several functions, so it makes sense to store once the value here.
(Driver._setup_environ_for_test): Factorize setting the environment for a given test.
(Driver._start): Get the environment from self._setup_environ_for_test()
* Scripts/webkitpy/port/driver_unittest.py:
(DriverTest):
(DriverTest.test_setup_environ_for_test): Add unittest for driver._setup_environ_for_test()
* Scripts/webkitpy/port/gtk.py: Move the inspection of the env var USE_NATIVE_XDISPLAY to the constructor.
(GtkPort.__init__):
(GtkPort._driver_class):
* Scripts/webkitpy/port/westondriver.py: Define and use self._setup_environ_for_test()
(WestonDriver._setup_environ_for_test):
(WestonDriver._start):
* Scripts/webkitpy/port/xorgdriver.py: Define and use self._setup_environ_for_test()
(XorgDriver._setup_environ_for_test):
(XorgDriver._start):
* Scripts/webkitpy/port/xvfbdriver.py: Define and use self._setup_environ_for_test()
(XvfbDriver._setup_environ_for_test):
(XvfbDriver._start):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/run-gtk-tests
Tools/Scripts/webkitpy/port/driver.py
Tools/Scripts/webkitpy/port/driver_unittest.py
Tools/Scripts/webkitpy/port/gtk.py
Tools/Scripts/webkitpy/port/westondriver.py
Tools/Scripts/webkitpy/port/xorgdriver.py
Tools/Scripts/webkitpy/port/xvfbdriver.py