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

Unified Diff: tools/clang/scripts/test_tool.py

Issue 2627003003: Add --idl-methods <filepath> parameter for skipping renaming of IDL methods. (Closed)
Patch Set: Addressed remaining CR feedback from dcheng@. Created 3 years, 11 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 | « tools/clang/rewrite_to_chrome_style/tests/run_tool.args ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/clang/scripts/test_tool.py
diff --git a/tools/clang/scripts/test_tool.py b/tools/clang/scripts/test_tool.py
index f21e8c3cf7097cb5f2c3d6c01e7122cd125eb825..ffd6c37e2ca4c9df5acdf057e98241f1eb61133c 100755
--- a/tools/clang/scripts/test_tool.py
+++ b/tools/clang/scripts/test_tool.py
@@ -56,9 +56,17 @@ def _RunToolAndApplyEdits(tools_clang_scripts_directory,
# Launch the following pipeline:
# run_tool.py ... | extract_edits.py | apply_edits.py ...
args = ['python',
- os.path.join(tools_clang_scripts_directory, 'run_tool.py'),
+ os.path.join(tools_clang_scripts_directory, 'run_tool.py')]
+ extra_run_tool_args_path = os.path.join(test_directory_for_tool,
+ "run_tool.args")
+ if os.path.exists(extra_run_tool_args_path):
+ with open(extra_run_tool_args_path, 'r') as extra_run_tool_args_file:
+ extra_run_tool_args = extra_run_tool_args_file.readlines()
+ args.extend([arg.strip() for arg in extra_run_tool_args])
+ args.extend([
tool_to_test,
- test_directory_for_tool]
+ test_directory_for_tool])
+
args.extend(actual_files)
run_tool = subprocess.Popen(args, stdout=subprocess.PIPE)
@@ -142,6 +150,7 @@ def main(argv):
f.write(_GenerateCompileCommands(actual_files, include_paths))
# Run the tool.
+ os.chdir(test_directory_for_tool)
exitcode = _RunToolAndApplyEdits(tools_clang_scripts_directory, tool_to_test,
test_directory_for_tool, actual_files)
if (exitcode != 0):
« no previous file with comments | « tools/clang/rewrite_to_chrome_style/tests/run_tool.args ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698