Commit eb42533b authored by mrobinson@webkit.org's avatar mrobinson@webkit.org

[GTK] [CMake] run-webkit-tests should support the CMake build

https://bugs.webkit.org/show_bug.cgi?id=126503

Reviewed by Daniel Bates.

Update run-launcher and gtk.py to work properly when dealing with the CMake port.
run-webkit-tests does not need the --gtkcmake flag, but run-launcher does.

* Scripts/run-launcher: Work properly with the gtkcmake flag.
* Scripts/webkitpy/port/gtk.py:
(GtkPort._is_cmake_build): Added this helper which looks for the CMakeCache
file to detect a CMake build.
(GtkPort._built_executables_path): Added this helper to locate the built executable path.
(GtkPort._built_libraries_path): Added this helper to locate the built library path.
(GtkPort._port_flag_for_scripts): Use --gtkcmake when appropriate.
(GtkPort.setup_environ_for_server): The way CMake builds libraries differs from GTK+.
(GtkPort._path_to_driver): Use the new helper.
(GtkPort._path_to_image_diff): Use the new Helper.
(GtkPort._path_to_webcore_library): Use the new helper.
(GtkPort.build_webkit_command): Use --gtkcmake when appropriate.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@162585 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 311b0f40
2014-01-05 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] run-webkit-tests should support the CMake build
https://bugs.webkit.org/show_bug.cgi?id=126503
Reviewed by Daniel Bates.
Update run-launcher and gtk.py to work properly when dealing with the CMake port.
run-webkit-tests does not need the --gtkcmake flag, but run-launcher does.
* Scripts/run-launcher: Work properly with the gtkcmake flag.
* Scripts/webkitpy/port/gtk.py:
(GtkPort._is_cmake_build): Added this helper which looks for the CMakeCache
file to detect a CMake build.
(GtkPort._built_executables_path): Added this helper to locate the built executable path.
(GtkPort._built_libraries_path): Added this helper to locate the built library path.
(GtkPort._port_flag_for_scripts): Use --gtkcmake when appropriate.
(GtkPort.setup_environ_for_server): The way CMake builds libraries differs from GTK+.
(GtkPort._path_to_driver): Use the new helper.
(GtkPort._path_to_image_diff): Use the new Helper.
(GtkPort._path_to_webcore_library): Use the new helper.
(GtkPort.build_webkit_command): Use --gtkcmake when appropriate.
2014-01-22 Ryuan Choi <ryuan.choi@samsung.com> 2014-01-22 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Remove unnecessary smart method since ewk_view_tiled removed [EFL] Remove unnecessary smart method since ewk_view_tiled removed
......
...@@ -46,10 +46,16 @@ checkFrameworks(); ...@@ -46,10 +46,16 @@ checkFrameworks();
# Set paths according to the build system used # Set paths according to the build system used
if (isGtk()) { if (isGtk()) {
if (isGtkAutotools()) {
$launcherPath = catdir($productDir, "Programs");
} else {
$launcherPath = catdir($productDir, "bin");
}
if (isWK2()) { if (isWK2()) {
$launcherPath = catdir($productDir, "Programs", "MiniBrowser"); $launcherPath = catdir($launcherPath, "MiniBrowser");
} else { } else {
$launcherPath = catdir($productDir, "Programs", "GtkLauncher"); $launcherPath = catdir($launcherPath, "GtkLauncher");
} }
} }
......
...@@ -53,11 +53,29 @@ class GtkPort(Port): ...@@ -53,11 +53,29 @@ class GtkPort(Port):
if not self.get_option("wrapper"): if not self.get_option("wrapper"):
raise ValueError('use --wrapper=\"valgrind\" for memory leak detection on GTK') raise ValueError('use --wrapper=\"valgrind\" for memory leak detection on GTK')
def _is_cmake_build(self):
return os.path.exists(self._build_path('CMakeCache.txt'))
def _built_executables_path(self, *path):
if self._is_cmake_build():
return self._build_path(*(('bin',) + path))
else:
return self._build_path(*(('Programs',) + path))
def _built_libraries_path(self, *path):
if self._is_cmake_build():
return self._build_path(*(('lib',) + path))
else:
return self._build_path(*(('.libs',) + path))
def warn_if_bug_missing_in_test_expectations(self): def warn_if_bug_missing_in_test_expectations(self):
return not self.get_option('webkit_test_runner') return not self.get_option('webkit_test_runner')
def _port_flag_for_scripts(self): def _port_flag_for_scripts(self):
return "--gtk" if self._is_cmake_build():
return "--gtkcmake"
else:
return "--gtk"
@memoized @memoized
def _driver_class(self): def _driver_class(self):
...@@ -94,8 +112,12 @@ class GtkPort(Port): ...@@ -94,8 +112,12 @@ class GtkPort(Port):
environment = super(GtkPort, self).setup_environ_for_server(server_name) environment = super(GtkPort, self).setup_environ_for_server(server_name)
environment['GSETTINGS_BACKEND'] = 'memory' environment['GSETTINGS_BACKEND'] = 'memory'
environment['LIBOVERLAY_SCROLLBAR'] = '0' environment['LIBOVERLAY_SCROLLBAR'] = '0'
environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('Libraries', 'libTestRunnerInjectedBundle.la') if self._is_cmake_build():
environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('TestNetscapePlugin', '.libs') environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('lib', 'libTestRunnerInjectedBundle.so')
environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('lib')
else:
environment['TEST_RUNNER_INJECTED_BUNDLE_FILENAME'] = self._build_path('Libraries', 'libTestRunnerInjectedBundle.la')
environment['TEST_RUNNER_TEST_PLUGIN_PATH'] = self._build_path('TestNetscapePlugin', '.libs')
environment['AUDIO_RESOURCES_PATH'] = self.path_from_webkit_base('Source', 'WebCore', 'platform', 'audio', 'resources') environment['AUDIO_RESOURCES_PATH'] = self.path_from_webkit_base('Source', 'WebCore', 'platform', 'audio', 'resources')
self._copy_value_from_environ_if_set(environment, 'WEBKIT_OUTPUTDIR') self._copy_value_from_environ_if_set(environment, 'WEBKIT_OUTPUTDIR')
if self.get_option("leaks"): if self.get_option("leaks"):
...@@ -130,10 +152,10 @@ class GtkPort(Port): ...@@ -130,10 +152,10 @@ class GtkPort(Port):
return configurations return configurations
def _path_to_driver(self): def _path_to_driver(self):
return self._build_path('Programs', self.driver_name()) return self._built_executables_path(self.driver_name())
def _path_to_image_diff(self): def _path_to_image_diff(self):
return self._build_path('Programs', 'ImageDiff') return self._built_executables_path('ImageDiff')
def _path_to_webcore_library(self): def _path_to_webcore_library(self):
gtk_library_names = [ gtk_library_names = [
...@@ -143,7 +165,7 @@ class GtkPort(Port): ...@@ -143,7 +165,7 @@ class GtkPort(Port):
] ]
for library in gtk_library_names: for library in gtk_library_names:
full_library = self._build_path(".libs", library) full_library = self._built_libraries_path(library)
if self._filesystem.isfile(full_library): if self._filesystem.isfile(full_library):
return full_library return full_library
return None return None
...@@ -192,11 +214,16 @@ class GtkPort(Port): ...@@ -192,11 +214,16 @@ class GtkPort(Port):
def build_webkit_command(self, build_style=None): def build_webkit_command(self, build_style=None):
command = super(GtkPort, self).build_webkit_command(build_style) command = super(GtkPort, self).build_webkit_command(build_style)
command.extend(["--gtk", "--update-gtk"]) if self._is_cmake_build():
command.extend(["--gtkcmake", "--update-gtk"])
else:
command.extend(["--gtk", "--update-gtk"])
if self.get_option('webkit_test_runner'): if self.get_option('webkit_test_runner'):
command.append("--no-webkit1") command.append("--no-webkit1")
else: else:
command.append("--no-webkit2") command.append("--no-webkit2")
command.append(super(GtkPort, self).make_args()) command.append(super(GtkPort, self).make_args())
return command return command
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment