Skip to content
Permalink
Browse files
[GTK] Reduplicate common.top_level_path in scripts
https://bugs.webkit.org/show_bug.cgi?id=129291

Reviewed by Philippe Normand.

Duplicate common.top_level_path and avoid polluting many scripts with awkward system
path manipulation and weird dependencies on the jhbuild infrastructure.

* Scripts/run-gtk-tests: Use common again.
(TestRunner._setup_testing_environment): Ditto.
* gtk/check-gdom-symbols: Ditto.
* gtk/common.py:
(top_level_path): Re-add top_level_path..
(get_build_path): Use the builtin top_level_path again.
* gtk/find-make-dist-errors: Use common again.
(get_missing_headers): Ditto.
* gtk/generate-inspector-gresource-manifest.py: Ditto.

Canonical link: https://commits.webkit.org/147433@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@164739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
mrobinson committed Feb 26, 2014
1 parent dcc5280 commit 1078c69c9835ef490e5f68a9b45f389ad61a6ccb
Showing 6 changed files with 36 additions and 23 deletions.
@@ -1,3 +1,23 @@
2014-02-24 Martin Robinson <mrobinson@igalia.com>

[GTK] Reduplicate common.top_level_path in scripts
https://bugs.webkit.org/show_bug.cgi?id=129291

Reviewed by Philippe Normand.

Duplicate common.top_level_path and avoid polluting many scripts with awkward system
path manipulation and weird dependencies on the jhbuild infrastructure.

* Scripts/run-gtk-tests: Use common again.
(TestRunner._setup_testing_environment): Ditto.
* gtk/check-gdom-symbols: Ditto.
* gtk/common.py:
(top_level_path): Re-add top_level_path..
(get_build_path): Use the builtin top_level_path again.
* gtk/find-make-dist-errors: Use common again.
(get_missing_headers): Ditto.
* gtk/generate-inspector-gresource-manifest.py: Ditto.

2014-02-26 Mark Hahnenberg <mhahnenberg@apple.com>

runscript: line 42: /bin/ls: Argument list too long
@@ -31,9 +31,6 @@ sys.path.append(os.path.join(top_level_directory, "Tools", "gtk"))
import common
import jhbuildutils

sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
import jhbuildrc_common

class SkippedTest:
ENTIRE_SUITE = None

@@ -198,7 +195,7 @@ class TestRunner:
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"] = jhbuildrc_common.top_level_path("Tools", "TestWebKitAPI", "Tests", "WebKit2")
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.tests_library_build_path()
self._test_env["WEBKIT_EXEC_PATH"] = self._programs_path

@@ -22,9 +22,6 @@ import subprocess
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):
return False
@@ -52,7 +49,7 @@ if __name__ == '__main__':
tmp.write(file_handle.read())
tmp.flush()

gdom_source_path = jhbuildrc_common.top_level_path('Source', 'WebCore', 'bindings')
gdom_source_path = 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])

@@ -21,16 +21,21 @@
import subprocess
import sys

sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
import jhbuildrc_common

top_level_dir = None
build_dir = None
library_build_dir = None
tests_library_build_dir = None
is_cmake = None
build_types = ('Release', 'Debug')


def top_level_path(*args):
global top_level_dir
if not top_level_dir:
top_level_dir = os.path.join(os.path.dirname(__file__), '..', '..')
return os.path.join(*(top_level_dir,) + args)


def set_build_types(new_build_types):
global build_types
build_types = new_build_types
@@ -100,20 +105,20 @@ def is_valid_build_directory(path):

global build_types
for build_type in build_types:
build_dir = jhbuildrc_common.top_level_path('WebKitBuild', build_type)
build_dir = 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 = jhbuildrc_common.top_level_path("_build")
build_dir = top_level_path("_build")
if is_valid_build_directory(build_dir):
return build_dir

build_dir = jhbuildrc_common.top_level_path()
build_dir = top_level_path()
if is_valid_build_directory(build_dir):
return build_dir

build_dir = jhbuildrc_common.top_level_path("WebKitBuild")
build_dir = top_level_path("WebKitBuild")
if is_valid_build_directory(build_dir):
return build_dir

@@ -20,9 +20,6 @@ import os
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')

@@ -89,7 +86,7 @@ def get_unlisted_headers(listed_makefile_headers):
def get_missing_headers(listed_makefile_headers):
missing = set()
for header in listed_makefile_headers:
if not os.path.exists(jhbuildrc_common.top_level_path(header)):
if not os.path.exists(common.top_level_path(header)):
missing.add(header)
return missing

@@ -20,10 +20,7 @@
import os
import sys

sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../jhbuild"))
import jhbuildrc_common

resources_path = jhbuildrc_common.top_level_path() + "/Source/WebInspectorUI/"
resources_path = common.top_level_path() + "/Source/WebInspectorUI/"
inspector_files = \
glob.glob(resources_path + 'UserInterface/*.html') + \
glob.glob(resources_path + 'UserInterface/Base/*.js') + \

0 comments on commit 1078c69

Please sign in to comment.