Title: [161214] trunk/Tools
Revision
161214
Author
[email protected]
Date
2014-01-02 11:45:58 -0800 (Thu, 02 Jan 2014)

Log Message

[GTK] [CMake] run-gtk-tests should run with the cmake build
https://bugs.webkit.org/show_bug.cgi?id=126341

Reviewed by Carlos Garcia Campos.

* Scripts/run-gtk-tests:
(TestRunner.__init__): Use the new calling conventions for the common script.
(TestRunner._setup_testing_environment): Ditto.
* gtk/common.py:
(set_build_types): Added set_build_types, to avoid having build_type arguments
for all functions in common.
(binary_build_path): Added this function which gets the path to the built binaries.
(get_build_path): Removed the build_types argument.
(build_path): Removed the build_types argument and call get_build_path directly now.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (161213 => 161214)


--- trunk/Tools/ChangeLog	2014-01-02 19:42:11 UTC (rev 161213)
+++ trunk/Tools/ChangeLog	2014-01-02 19:45:58 UTC (rev 161214)
@@ -1,3 +1,20 @@
+2014-01-02  Martin Robinson  <[email protected]>
+
+        [GTK] [CMake] run-gtk-tests should run with the cmake build
+        https://bugs.webkit.org/show_bug.cgi?id=126341
+
+        Reviewed by Carlos Garcia Campos.
+
+        * Scripts/run-gtk-tests:
+        (TestRunner.__init__): Use the new calling conventions for the common script.
+        (TestRunner._setup_testing_environment): Ditto.
+        * gtk/common.py:
+        (set_build_types): Added set_build_types, to avoid having build_type arguments
+        for all functions in common.
+        (binary_build_path): Added this function which gets the path to the built binaries.
+        (get_build_path): Removed the build_types argument.
+        (build_path): Removed the build_types argument and call get_build_path directly now.
+
 2014-01-02  Alexey Proskuryakov  <[email protected]>
 
         https://bugs.webkit.org/show_bug.cgi?id=126391

Modified: trunk/Tools/Scripts/run-gtk-tests (161213 => 161214)


--- trunk/Tools/Scripts/run-gtk-tests	2014-01-02 19:42:11 UTC (rev 161213)
+++ trunk/Tools/Scripts/run-gtk-tests	2014-01-02 19:45:58 UTC (rev 161214)
@@ -91,9 +91,11 @@
 
     def __init__(self, options, tests=[]):
         self._options = options
+
         self._build_type = "Debug" if self._options.debug else "Release"
+        common.set_build_types((self._build_type,))
 
-        self._programs_path = common.build_path_for_build_types((self._build_type,), "Programs")
+        self._programs_path = common.binary_build_path()
         self._tests = self._get_tests(tests)
         self._skipped_tests = TestRunner.SKIPPED
         self._disabled_tests = []
@@ -194,7 +196,7 @@
         self._test_env = os.environ
         self._test_env['GSETTINGS_BACKEND'] = 'memory'
         self._test_env["TEST_WEBKIT_API_WEBKIT2_RESOURCES_PATH"] = common.top_level_path("Tools", "TestWebKitAPI", "Tests", "WebKit2")
-        self._test_env["TEST_WEBKIT_API_WEBKIT2_INJECTED_BUNDLE_PATH"] = common.build_path_for_build_types((self._build_type,), "Libraries")
+        self._test_env["TEST_WEBKIT_API_WEBKIT2_INJECTED_BUNDLE_PATH"] = common.library_build_path()
         self._test_env["WEBKIT_EXEC_PATH"] = self._programs_path
 
         if not self._run_xvfb():

Modified: trunk/Tools/gtk/common.py (161213 => 161214)


--- trunk/Tools/gtk/common.py	2014-01-02 19:42:11 UTC (rev 161213)
+++ trunk/Tools/gtk/common.py	2014-01-02 19:45:58 UTC (rev 161214)
@@ -25,8 +25,14 @@
 build_dir = None
 library_build_dir = None
 is_cmake = None
+build_types = ('Release', 'Debug')
 
 
+def set_build_types(new_build_types):
+    global build_types
+    build_types = new_build_types
+
+
 def is_cmake_build():
     global is_cmake
     if is_cmake is None:
@@ -44,6 +50,16 @@
     return library_build_dir
 
 
+def binary_build_path(*args):
+    global library_build_dir
+    if not library_build_dir:
+        if is_cmake_build():
+            library_build_dir = build_path('bin', *args)
+        else:
+            library_build_dir = build_path('Programs', *args)
+    return library_build_dir
+
+
 def script_path(*args):
     global script_dir
     if not script_dir:
@@ -55,7 +71,7 @@
     return os.path.join(*((os.path.join(os.path.dirname(__file__), '..', '..'),) + args))
 
 
-def get_build_path(build_types=('Release', 'Debug'), fatal=True):
+def get_build_path(fatal=True):
     global build_dir
     if build_dir:
         return build_dir
@@ -80,6 +96,7 @@
     if is_valid_build_directory(build_dir):
         return build_dir
 
+    global build_types
     for build_type in build_types:
         build_dir = top_level_path('WebKitBuild', build_type)
         if is_valid_build_directory(build_dir):
@@ -103,12 +120,8 @@
         sys.exit(1)
 
 
-def build_path_for_build_types(build_types, *args):
-    return os.path.join(*(get_build_path(build_types),) + args)
-
-
 def build_path(*args):
-    return build_path_for_build_types(('Release', 'Debug'), *args)
+    return os.path.join(*(get_build_path(),) + args)
 
 
 def pkg_config_file_variable(package, variable):
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to