Commit 968e7691 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Move name_style_converter.py from blink/tools to renderer/build/scripts/.

We'd like to provide smaller tarballs with which one can build Chrome,
and such tarballs exclude //third_party/WebKit/Tools/Script. We're
moving //third_party/WebKit/Tools/Scripts to //third_party/blink/tools,
and would like to exclude //third_party/blink/tools as well. However,
some build scripts use name_style_converter.py in the directory.

This CL moves name_style_converter.py out from
//third_party/blink/tools, and enables to exclude
//third_party/blink/tools.

test-webkitpy includes //third_party/blink/renderer/build/scripts. So
the following existing tests run on buildbots in addition to
name_style_converter_test.py:
- in_file_unittest.py
- minimize_css_unittest.py
This CL fixes test failures of in_file_unittest.py.

Bug: 832283
Change-Id: I7d3b3524daa59291eaf7f323818a7b0e25163179
Reviewed-on: https://chromium-review.googlesource.com/1013768Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551514}
parent 9bbdf45e
......@@ -1001,8 +1001,9 @@ if (!is_ios) {
"//third_party/WebKit/LayoutTests/SlowTests",
"//third_party/WebKit/LayoutTests/TestExpectations",
"//third_party/WebKit/LayoutTests/VirtualTestSuites",
"//third_party/blink/renderer/bindings/scripts/",
"//third_party/WebKit/Tools/Scripts/",
"//third_party/blink/renderer/bindings/scripts/",
"//third_party/blink/renderer/build/scripts/",
"//third_party/blink/tools/",
"//third_party/catapult/common/py_utils/",
"//third_party/catapult/devil/",
......
......@@ -28,6 +28,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
import sys
from webkitpy.common import path_finder
......@@ -37,9 +38,11 @@ import typ
def main():
return typ.main(top_level_dirs=[path_finder.get_scripts_dir(),
path_finder.get_blink_tools_dir()],
path=[path_finder.get_webkitpy_thirdparty_dir()])
return typ.main(
top_level_dirs=[path_finder.get_scripts_dir(),
path_finder.get_blink_tools_dir(),
os.path.join(path_finder.get_source_dir(), 'build', 'scripts')],
path=[path_finder.get_webkitpy_thirdparty_dir()])
if __name__ == "__main__":
......
......@@ -27,9 +27,9 @@ from code_generator import CodeGeneratorBase, render_template
# TODO(dglazkov): Move TypedefResolver to code_generator.py
from code_generator_v8 import TypedefResolver
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..',
'third_party', 'blink', 'tools'))
from blinkpy.common.name_style_converter import NameStyleConverter
sys.path.append(os.path.join(os.path.dirname(__file__),
'..', '..', 'build', 'scripts'))
from blinkbuild.name_style_converter import NameStyleConverter
MODULE_PYNAME = os.path.splitext(os.path.basename(__file__))[0] + '.py'
......
......@@ -29,8 +29,7 @@ idl_lexer_parser_files = get_path_info([
"blink_idl_parser.py",
],
"abspath")
idl_compiler_files =
get_path_info(
idl_compiler_files = get_path_info(
[
"idl_compiler.py",
......@@ -55,7 +54,7 @@ idl_compiler_files =
"v8_types.py",
"v8_union.py",
"v8_utilities.py",
"//third_party/blink/tools/blinkpy/common/name_style_converter.py",
"//third_party/blink/renderer/build/scripts/blinkbuild/name_style_converter.py",
],
"abspath")
......
......@@ -15,9 +15,9 @@ import string
import subprocess
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..',
'third_party', 'blink', 'tools'))
from blinkpy.common.name_style_converter import NameStyleConverter
sys.path.append(os.path.join(os.path.dirname(__file__),
'..', '..', 'build', 'scripts'))
from blinkbuild.name_style_converter import NameStyleConverter
KNOWN_COMPONENTS = frozenset(['core', 'modules'])
......
# Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
......@@ -42,7 +42,7 @@ name2
'arg': None,
'arg2': [],
}
in_file = InFile(lines, defaults, None)
in_file = InFile(['test_basic_parse.in'], lines, defaults, None)
expected_values = [
{'name': 'name1', 'arg': 'value', 'arg2': ['value2', 'value3']},
{'name': 'name2', 'arg': None, 'arg2': []},
......@@ -65,7 +65,8 @@ name2
'namespace': '',
'fruit': False,
}
in_file = InFile(lines, defaults, default_parameters=default_parameters)
in_file = InFile(['test_with_parameters.in'], lines, defaults,
default_parameters=default_parameters)
expected_parameters = {
'namespace': 'TestNamespace',
'fruit': True,
......
......@@ -60,9 +60,7 @@ import os.path
import re
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..',
'third_party', 'blink', 'tools'))
from blinkpy.common.name_style_converter import NameStyleConverter
from blinkbuild.name_style_converter import NameStyleConverter
def _json5_load(lines):
......
Python code for Blink developmenet and testing.
This directory should not include code which is necessary to build
Chrome browser. Such code should be in //third_party/blink/renderer/build/scripts/.
......@@ -17,11 +17,10 @@ import re
import sys
from functools import partial
# Without abspath(), PathFinder can't find chromium_base correctly.
sys.path.append(os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', '..', '..',
'third_party', 'WebKit', 'Tools', 'Scripts')))
from blinkpy.common.name_style_converter import NameStyleConverter
sys.path.append(os.path.join(os.path.dirname(__file__),
'..', 'renderer', 'build', 'scripts'))
from blinkbuild.name_style_converter import NameStyleConverter
from blinkpy.common import add_webkitpy # pylint: disable=unused-import
from plan_blink_move import plan_blink_move
from plan_blink_move import relative_dest
from webkitpy.common.checkout.git import Git
......
......@@ -7,9 +7,9 @@ import os
import re
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', '..',
'third_party', 'WebKit', 'Tools', 'Scripts'))
from blinkpy.common.name_style_converter import NameStyleConverter
sys.path.append(os.path.join(os.path.dirname(__file__),
'..', 'renderer', 'build', 'scripts'))
from blinkbuild.name_style_converter import NameStyleConverter
from webkitpy.common.system.filesystem import FileSystem
......
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