Title: [168708] releases/WebKitGTK/webkit-2.4/Tools
Revision
168708
Author
g...@gnome.org
Date
2014-05-13 12:28:38 -0700 (Tue, 13 May 2014)

Log Message

Merge 164585 - Extract common parts from jhbuildrc files.
https://bugs.webkit.org/show_bug.cgi?id=125986

Patch by Tibor Meszaros <tmeszaros.u-sze...@partner.samsung.com> on 2014-02-24
Reviewed by Csaba Osztrogonác.

Co-authored with Peter Szanka <h868...@stud.u-szeged.hu>.

* Scripts/run-gtk-tests:
(TestRunner._setup_testing_environment):
* efl/common.py: Removed.
* efl/jhbuildrc:
* gtk/check-gdom-symbols:
* gtk/common.py:
(binary_build_path):
(get_build_path):
* gtk/find-make-dist-errors:
(get_missing_headers):
* gtk/generate-gtkdoc:
(get_webkit2_options):
(get_webkit1_options.src_path):
(get_webkit1_options):
(get_webkitdom_options.src_path):
(get_webkitdom_options):
* gtk/generate-inspector-gresource-manifest.py:
* gtk/jhbuildrc:
* jhbuild/jhbuildrc_common.py: Added.
(script_path):
(top_level_path):
(init):


Conflicts:
	Tools/ChangeLog

Modified Paths

Added Paths

Removed Paths

Diff

Modified: releases/WebKitGTK/webkit-2.4/Tools/Scripts/run-gtk-tests (168707 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/Scripts/run-gtk-tests	2014-05-13 19:28:16 UTC (rev 168707)
+++ releases/WebKitGTK/webkit-2.4/Tools/Scripts/run-gtk-tests	2014-05-13 19:28:38 UTC (rev 168708)
@@ -31,6 +31,9 @@
 import common
 import jhbuildutils
 
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
+import jhbuildrc_common 
+
 class SkippedTest:
     ENTIRE_SUITE = None
 
@@ -195,7 +198,7 @@
     def _setup_testing_environment(self):
         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_RESOURCES_PATH"] = jhbuildrc_common.top_level_path("Tools", "TestWebKitAPI", "Tests", "WebKit2")
         self._test_env["TEST_WEBKIT_API_WEBKIT2_INJECTED_BUNDLE_PATH"] = common.tests_library_build_path()
         self._test_env["WEBKIT_EXEC_PATH"] = self._programs_path
 

Deleted: releases/WebKitGTK/webkit-2.4/Tools/efl/common.py (168707 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/efl/common.py	2014-05-13 19:28:16 UTC (rev 168707)
+++ releases/WebKitGTK/webkit-2.4/Tools/efl/common.py	2014-05-13 19:28:38 UTC (rev 168708)
@@ -1,31 +0,0 @@
-#!/usr/bin/env python
-# Copyright (C) 2011 Igalia S.L.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-
-import os
-
-script_dir = None
-
-
-def script_path(*args):
-    global script_dir
-    if not script_dir:
-        script_dir = os.path.join(os.path.dirname(__file__), '..', 'Scripts')
-    return os.path.join(*(script_dir,) + args)
-
-
-def top_level_path(*args):
-    return os.path.join(*((script_path('..', '..'),) + args))

Modified: releases/WebKitGTK/webkit-2.4/Tools/efl/jhbuildrc (168707 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/efl/jhbuildrc	2014-05-13 19:28:16 UTC (rev 168707)
+++ releases/WebKitGTK/webkit-2.4/Tools/efl/jhbuildrc	2014-05-13 19:28:38 UTC (rev 168708)
@@ -16,38 +16,12 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-import multiprocessing
 import sys
 
-__efl_tools_directory = os.path.abspath(os.path.dirname(__file__))
-sys.path = [__efl_tools_directory] + sys.path
-import common
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild") )
+import jhbuildrc_common
+jhbuildrc_common.init(globals(), "efl") 
 
-build_policy = 'updated'
-
-# FIXME: move shared parts into ../jhbuild folder.
-
-__moduleset_file_uri = 'file://' + os.path.join(__efl_tools_directory, 'jhbuild.modules')
-__extra_modulesets = os.environ.get("WEBKIT_EXTRA_MODULESETS", "").split(",")
-moduleset = [ __moduleset_file_uri, ]
-if __extra_modulesets != ['']:
-    moduleset.extend(__extra_modulesets)
-
-__extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",")
-modules = [ 'webkitefl-testing-dependencies', ]
-if __extra_modules != ['']:
-    modules.extend(__extra_modules)
-
-if os.environ.has_key('WEBKIT_OUTPUTDIR'):
-    checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source'))
-    prefix = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root'))
-else:
-    checkoutroot = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Source'))
-    prefix = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Root'))
-
-nonotify = True
-notrayicon = True
-
 if 'NUMBER_OF_PROCESSORS' in os.environ:
     jobs = os.environ['NUMBER_OF_PROCESSORS']
 

Modified: releases/WebKitGTK/webkit-2.4/Tools/gtk/check-gdom-symbols (168707 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/gtk/check-gdom-symbols	2014-05-13 19:28:16 UTC (rev 168707)
+++ releases/WebKitGTK/webkit-2.4/Tools/gtk/check-gdom-symbols	2014-05-13 19:28:38 UTC (rev 168708)
@@ -22,6 +22,8 @@
 import sys
 import tempfile
 
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
+import jhbuildrc_common 
 
 def should_update_symbols_file(new, old):
     if not os.path.exists(old):
@@ -50,7 +52,7 @@
                 tmp.write(file_handle.read())
         tmp.flush()
 
-        gdom_source_path = common.top_level_path('Source', 'WebCore', 'bindings')
+        gdom_source_path = jhbuildrc_common.top_level_path('Source', 'WebCore', 'bindings')
         api_break_test_path = os.path.join(gdom_source_path, 'scripts', 'gobject-run-api-break-test')
         subprocess.call([sys.executable, api_break_test_path, os.path.join(gdom_source_path, 'gobject',  'webkitdom.symbols'), tmp.name])
 

Modified: releases/WebKitGTK/webkit-2.4/Tools/gtk/common.py (168707 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/gtk/common.py	2014-05-13 19:28:16 UTC (rev 168707)
+++ releases/WebKitGTK/webkit-2.4/Tools/gtk/common.py	2014-05-13 19:28:38 UTC (rev 168708)
@@ -21,7 +21,9 @@
 import subprocess
 import sys
 
-script_dir = None
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
+import jhbuildrc_common
+
 build_dir = None
 library_build_dir = None
 tests_library_build_dir = None
@@ -71,17 +73,6 @@
     return library_build_dir
 
 
-def script_path(*args):
-    global script_dir
-    if not script_dir:
-        script_dir = os.path.join(os.path.dirname(__file__), '..', 'Scripts')
-    return os.path.join(*(script_dir,) + args)
-
-
-def top_level_path(*args):
-    return os.path.join(*((os.path.join(os.path.dirname(__file__), '..', '..'),) + args))
-
-
 def get_build_path(fatal=True):
     global build_dir
     if build_dir:
@@ -109,20 +100,20 @@
 
     global build_types
     for build_type in build_types:
-        build_dir = top_level_path('WebKitBuild', build_type)
+        build_dir = jhbuildrc_common.top_level_path('WebKitBuild', build_type)
         if is_valid_build_directory(build_dir):
             return build_dir
 
     # distcheck builds in a directory named _build in the top-level path.
-    build_dir = top_level_path("_build")
+    build_dir = jhbuildrc_common.top_level_path("_build")
     if is_valid_build_directory(build_dir):
         return build_dir
 
-    build_dir = top_level_path()
+    build_dir = jhbuildrc_common.top_level_path()
     if is_valid_build_directory(build_dir):
         return build_dir
 
-    build_dir = top_level_path("WebKitBuild")
+    build_dir = jhbuildrc_common.top_level_path("WebKitBuild")
     if is_valid_build_directory(build_dir):
         return build_dir
 

Modified: releases/WebKitGTK/webkit-2.4/Tools/gtk/find-make-dist-errors (168707 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/gtk/find-make-dist-errors	2014-05-13 19:28:16 UTC (rev 168707)
+++ releases/WebKitGTK/webkit-2.4/Tools/gtk/find-make-dist-errors	2014-05-13 19:28:38 UTC (rev 168708)
@@ -20,6 +20,9 @@
 import subprocess
 import sys
 
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
+import jhbuildrc_common 
+
 def is_source_file_listing(line):
     return line.strip().startswith('Source')
 
@@ -86,7 +89,7 @@
 def get_missing_headers(listed_makefile_headers):
     missing = set()
     for header in listed_makefile_headers:
-        if not os.path.exists(common.top_level_path(header)):
+        if not os.path.exists(jhbuildrc_common.top_level_path(header)):
             missing.add(header)
     return missing
 

Modified: releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-gtkdoc (168707 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-gtkdoc	2014-05-13 19:28:16 UTC (rev 168707)
+++ releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-gtkdoc	2014-05-13 19:28:38 UTC (rev 168708)
@@ -23,6 +23,9 @@
 import os.path
 import sys
 
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
+import jhbuildrc_common
+
 def configure_logging(verbose):
     level = logging.DEBUG if verbose else logging.INFO
     logger = logging.getLogger('gtkdoc')
@@ -61,8 +64,8 @@
     return common.build_path('Documentation', 'webkitdomgtk', 'html')
 
 def get_webkit2_options(virtual_root):
-    api_path = common.top_level_path('Source', 'WebKit2', 'UIProcess', 'API', 'gtk')
-    injected_bundle_api_path = common.top_level_path('Source', 'WebKit2', 'WebProcess', 'InjectedBundle', 'API', 'gtk')
+    api_path = jhbuildrc_common.top_level_path('Source', 'WebKit2', 'UIProcess', 'API', 'gtk')
+    injected_bundle_api_path = jhbuildrc_common.top_level_path('Source', 'WebKit2', 'WebProcess', 'InjectedBundle', 'API', 'gtk')
 
     if common.is_cmake_build():
         generated_api_path = common.build_path('DerivedSources', 'webkit2gtk', 'webkit2')
@@ -89,7 +92,7 @@
         'source_dirs' : [src_path(), generated_api_path, injected_bundle_api_path],
         'cflags' :
             # Common paths
-            ' -I' + common.top_level_path('Source') + \
+            ' -I' + jhbuildrc_common.top_level_path('Source') + \
             ' -I' + api_path + \
             # Autotools paths
             ' -I' + common.build_path('DerivedSources', 'webkit2gtk', 'include') + \
@@ -115,7 +118,7 @@
 
 def get_webkit1_options(gtk_version, virtual_root):
     def src_path(*args):
-        return common.top_level_path(*(('Source', 'WebKit', 'gtk') + args))
+        return jhbuildrc_common.top_level_path(*(('Source', 'WebKit', 'gtk') + args))
 
     def webkitversionh_path():
         if common.is_cmake_build():
@@ -146,8 +149,8 @@
         'cflags' : ' -I' + common.build_path('WebKit', 'gtk') + \
                    ' -I' + common.build_path('DerivedSources') + \
                    ' -I' + src_path() + \
-                   ' -I' + common.top_level_path('Source') + \
-                   ' -I' + common.top_level_path('Source', '_javascript_Core', 'ForwardingHeaders'),
+                   ' -I' + jhbuildrc_common.top_level_path('Source') + \
+                   ' -I' + jhbuildrc_common.top_level_path('Source', '_javascript_Core', 'ForwardingHeaders'),
         'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps) + [webkitdom_docs_html_path()],
         'ignored_files': glob.glob(src_path('webkit', '*private.*')) + \
                          glob.glob(src_path('webkit', 'webkitauthenticationdialog.*')) + \
@@ -159,7 +162,7 @@
     def derived_sources_path(*args):
         return common.build_path(*(('DerivedSources', 'webkitdom') + args))
     def src_path(*args):
-        return common.top_level_path(*(('Source', 'WebCore', 'bindings', 'gobject') + args))
+        return jhbuildrc_common.top_level_path(*(('Source', 'WebCore', 'bindings', 'gobject') + args))
 
     xref_deps = { 'glib-2.0' : ['glib', 'gobject', 'gio'] }
 
@@ -175,7 +178,7 @@
         'source_dirs' : [derived_sources_path()],
         'cflags' : ' -I' + derived_sources_path() + \
                    ' -I' + src_path() + \
-                   ' -I' + common.top_level_path('Source'),
+                   ' -I' + jhbuildrc_common.top_level_path('Source'),
         'cross_reference_deps' : get_gtkdoc_module_paths(xref_deps),
         'ignored_files': glob.glob(derived_sources_path('*Private.h'))
     }

Modified: releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-inspector-gresource-manifest.py (168707 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-inspector-gresource-manifest.py	2014-05-13 19:28:16 UTC (rev 168707)
+++ releases/WebKitGTK/webkit-2.4/Tools/gtk/generate-inspector-gresource-manifest.py	2014-05-13 19:28:38 UTC (rev 168708)
@@ -20,7 +20,10 @@
 import os
 import sys
 
-resources_path = common.top_level_path() + "/Source/WebInspectorUI/"
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
+import jhbuildrc_common
+
+resources_path = jhbuildrc_common.top_level_path() + "/Source/WebInspectorUI/"
 inspector_files = \
     glob.glob(resources_path + 'UserInterface/*.html') + \
     glob.glob(resources_path + 'UserInterface/*.js') + \

Modified: releases/WebKitGTK/webkit-2.4/Tools/gtk/jhbuildrc (168707 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/gtk/jhbuildrc	2014-05-13 19:28:16 UTC (rev 168707)
+++ releases/WebKitGTK/webkit-2.4/Tools/gtk/jhbuildrc	2014-05-13 19:28:38 UTC (rev 168708)
@@ -15,36 +15,16 @@
 # License along with this library; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
 
-import multiprocessing
 import sys
 
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild") )
+import jhbuildrc_common
+jhbuildrc_common.init(globals(), "gtk") 
+
 __gtk_tools_directory = os.path.abspath(os.path.dirname(__file__))
 sys.path = [__gtk_tools_directory] + sys.path
 import common
 
-build_policy = 'updated'
-
-__moduleset_file_uri = 'file://' + os.path.join(__gtk_tools_directory, 'jhbuild.modules')
-__extra_modulesets = os.environ.get("WEBKIT_EXTRA_MODULESETS", "").split(",")
-moduleset = [ __moduleset_file_uri, ]
-if __extra_modulesets != ['']:
-    moduleset.extend(__extra_modulesets)
-
-__extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",")
-modules = [ 'webkitgtk-testing-dependencies', ]
-if __extra_modules != ['']:
-    modules.extend(__extra_modules)
-
-if os.environ.has_key('WEBKIT_OUTPUTDIR'):
-    checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source'))
-    prefix = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root'))
-else:
-    checkoutroot = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Source'))
-    prefix = os.path.abspath(common.top_level_path('WebKitBuild','Dependencies', 'Root'))
-
-nonotify = True
-notrayicon = True
-
 if 'NUMBER_OF_PROCESSORS' in os.environ:
     jobs = os.environ['NUMBER_OF_PROCESSORS']
 

Added: releases/WebKitGTK/webkit-2.4/Tools/jhbuild/jhbuildrc_common.py (0 => 168708)


--- releases/WebKitGTK/webkit-2.4/Tools/jhbuild/jhbuildrc_common.py	                        (rev 0)
+++ releases/WebKitGTK/webkit-2.4/Tools/jhbuild/jhbuildrc_common.py	2014-05-13 19:28:38 UTC (rev 168708)
@@ -0,0 +1,64 @@
+#!/usr/bin/env python
+# Copyright (C) 2011 Igalia S.L.
+# Copyright (C) 2012 Intel Corporation
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+import multiprocessing
+import sys
+import os
+
+
+script_dir = None
+
+
+def script_path(*args):
+    global script_dir
+    if not script_dir:
+        script_dir = os.path.join(os.path.dirname(__file__), '..', 'Scripts')
+    return os.path.join(*(script_dir,) + args)
+
+
+def top_level_path(*args):
+    return os.path.join(*((os.path.join(os.path.dirname(__file__), '..', '..'),) + args))
+
+
+def init(jhbuildrc_globals, platform):
+
+    __tools_directory = os.path.join(os.path.dirname(__file__), "../", platform)
+    sys.path.insert(0, __tools_directory)
+
+    jhbuildrc_globals["build_policy"] = 'updated'
+
+    __moduleset_file_uri = 'file://' + os.path.join(__tools_directory, 'jhbuild.modules')
+    __extra_modulesets = os.environ.get("WEBKIT_EXTRA_MODULESETS", "").split(",")
+    jhbuildrc_globals["moduleset"] = [__moduleset_file_uri, ]
+    if __extra_modulesets != ['']:
+        jhbuildrc_globals["moduleset"].extend(__extra_modulesets)
+
+    __extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",")
+    jhbuildrc_globals["modules"] = ['webkit' + platform + '-testing-dependencies', ]
+    if __extra_modules != ['']:
+        jhbuildrc_globals["modules"].extend(__extra_modules)
+
+    if 'WEBKIT_OUTPUTDIR' in os.environ:
+        jhbuildrc_globals["checkoutroot"] = checkoutroot = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Source'))
+        jhbuildrc_globals["prefix"] = os.path.abspath(os.path.join(os.environ['WEBKIT_OUTPUTDIR'], 'Dependencies', 'Root'))
+    else:
+        jhbuildrc_globals["checkoutroot"] = checkoutroot = os.path.abspath(top_level_path('WebKitBuild', 'Dependencies', 'Source'))
+        jhbuildrc_globals["prefix"] = os.path.abspath(top_level_path('WebKitBuild', 'Dependencies', 'Root'))
+
+    jhbuildrc_globals["nonotify"] = True
+    jhbuildrc_globals["notrayicon"] = True
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to