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

Side by Side Diff: third_party/WebKit/Tools/Scripts/webkitpy/bindings/main.py

Issue 1846093002: Revert of Remove unused imports in webkitpy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/__init__.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2011 Google Inc. All rights reserved. 1 # Copyright (C) 2011 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions 4 # modification, are permitted provided that the following conditions
5 # are met: 5 # are met:
6 # 1. Redistributions of source code must retain the above copyright 6 # 1. Redistributions of source code must retain the above copyright
7 # notice, this list of conditions and the following disclaimer. 7 # notice, this list of conditions and the following disclaimer.
8 # 2. Redistributions in binary form must reproduce the above copyright 8 # 2. Redistributions in binary form must reproduce the above copyright
9 # notice, this list of conditions and the following disclaimer in the 9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution. 10 # documentation and/or other materials provided with the distribution.
11 # 11 #
12 # THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY 12 # THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
13 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 13 # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 14 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 15 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
16 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 16 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 17 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 18 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 19 # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20 # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 20 # OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 21 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 # 23 #
24 24
25 from contextlib import contextmanager 25 from contextlib import contextmanager
26 import filecmp 26 import filecmp
27 import fnmatch 27 import fnmatch
28 import os 28 import os
29 import re
29 import shutil 30 import shutil
30 import sys 31 import sys
31 import tempfile 32 import tempfile
32 33
33 from webkitpy.common.system.executive import Executive 34 from webkitpy.common.system.executive import Executive
34 35
35 # Source/ path is needed both to find input IDL files, and to import other 36 # Source/ path is needed both to find input IDL files, and to import other
36 # Python modules. 37 # Python modules.
37 module_path = os.path.dirname(__file__) 38 module_path = os.path.dirname(__file__)
38 source_path = os.path.normpath(os.path.join(module_path, os.pardir, os.pardir, 39 source_path = os.path.normpath(os.path.join(module_path, os.pardir, os.pardir,
39 os.pardir, os.pardir, 'Source')) 40 os.pardir, os.pardir, 'Source'))
40 sys.path.append(source_path) # for Source/bindings imports 41 sys.path.append(source_path) # for Source/bindings imports
41 42
42 from bindings.scripts.code_generator_v8 import CodeGeneratorUnionType 43 from bindings.scripts.code_generator_v8 import CodeGeneratorUnionType
44 import bindings.scripts.compute_interfaces_info_individual
43 from bindings.scripts.compute_interfaces_info_individual import InterfaceInfoCol lector 45 from bindings.scripts.compute_interfaces_info_individual import InterfaceInfoCol lector
46 import bindings.scripts.compute_interfaces_info_overall
44 from bindings.scripts.compute_interfaces_info_overall import compute_interfaces_ info_overall, interfaces_info 47 from bindings.scripts.compute_interfaces_info_overall import compute_interfaces_ info_overall, interfaces_info
45 from bindings.scripts.idl_compiler import IdlCompilerDictionaryImpl, IdlCompiler V8 48 from bindings.scripts.idl_compiler import IdlCompilerDictionaryImpl, IdlCompiler V8
46 from bindings.scripts.utilities import ComponentInfoProviderCore 49 from bindings.scripts.idl_reader import IdlReader
47 from bindings.scripts.utilities import ComponentInfoProviderModules 50 from bindings.scripts.utilities import ComponentInfoProviderCore, ComponentInfoP roviderModules, idl_filename_to_component, write_file
48 from bindings.scripts.utilities import write_file
49 51
50 52
51 PASS_MESSAGE = 'All tests PASS!' 53 PASS_MESSAGE = 'All tests PASS!'
52 FAIL_MESSAGE = """Some tests FAIL! 54 FAIL_MESSAGE = """Some tests FAIL!
53 To update the reference files, execute: 55 To update the reference files, execute:
54 run-bindings-tests --reset-results 56 run-bindings-tests --reset-results
55 57
56 If the failures are not due to your changes, test results may be out of sync; 58 If the failures are not due to your changes, test results may be out of sync;
57 please rebaseline them in a separate CL, after checking that tests fail in ToT. 59 please rebaseline them in a separate CL, after checking that tests fail in ToT.
58 In CL, please set: 60 In CL, please set:
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 344
343 345
344 def run_bindings_tests(reset_results, verbose): 346 def run_bindings_tests(reset_results, verbose):
345 # Generate output into the reference directory if resetting results, or 347 # Generate output into the reference directory if resetting results, or
346 # a temp directory if not. 348 # a temp directory if not.
347 if reset_results: 349 if reset_results:
348 print 'Resetting results' 350 print 'Resetting results'
349 return bindings_tests(reference_directory, verbose) 351 return bindings_tests(reference_directory, verbose)
350 with TemporaryDirectory() as temp_dir: 352 with TemporaryDirectory() as temp_dir:
351 return bindings_tests(temp_dir, verbose) 353 return bindings_tests(temp_dir, verbose)
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698