Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(532)

Unified Diff: Tools/Scripts/webkitpy/bindings/main.py

Issue 563453002: run-bindings-tests should use 'core' or 'modules' as component_dir. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/tests/results/modules/V8TestInterface5.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Tools/Scripts/webkitpy/bindings/main.py
diff --git a/Tools/Scripts/webkitpy/bindings/main.py b/Tools/Scripts/webkitpy/bindings/main.py
index 8a88f51adf9494d9d223bb42b139b71ab6831a4e..b0fe46b0b8523500b069d2d7f025db0e37dc241e 100644
--- a/Tools/Scripts/webkitpy/bindings/main.py
+++ b/Tools/Scripts/webkitpy/bindings/main.py
@@ -26,6 +26,7 @@ from contextlib import contextmanager
import filecmp
import fnmatch
import os
+import re
import shutil
import sys
import tempfile
@@ -91,6 +92,16 @@ def TemporaryDirectory():
shutil.rmtree(name)
+COMPONENT_PATH_PATTERN = re.compile(r'/(core|modules)(/|$)')
+
+
+def detect_component_dir(path):
+ match = COMPONENT_PATH_PATTERN.search(os.path.dirname(path))
+ if match:
+ return match.group(1)
+ raise AssertionError('"%s" is not placed under known component_dir, core or modules.' % path)
+
+
def generate_interface_dependencies():
def idl_paths_recursive(directory):
# This is slow, especially on Windows, due to os.walk making
@@ -122,8 +133,15 @@ def generate_interface_dependencies():
# for each new component) and doesn't test the code generator any better
# than using a single component.
for idl_filename in idl_paths_recursive(source_path):
- compute_info_individual(idl_filename, 'tests')
+ compute_info_individual(idl_filename, detect_component_dir(idl_filename))
info_individuals = [info_individual()]
+ # TestDictionary.{h,cpp} are placed under Source/bindings/tests/idls/core.
+ # However, IdlCompiler generates TestDictionary.{h,cpp} by using relative_dir.
+ # So the files will be generated under output_dir/core/bindings/tests/idls/core.
+ # To avoid this issue, we need to clear relative_dir here.
+ for info in info_individuals:
+ for value in info['interfaces_info'].itervalues():
+ value['relative_dir'] = ''
compute_interfaces_info_overall(info_individuals)
« no previous file with comments | « Source/bindings/tests/results/modules/V8TestInterface5.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698