Commit 8e21b47a authored by dpapad's avatar dpapad Committed by Commit Bot

Ignore ui/webui/resources/tools/tests grd files in src/PRESUBMIT.py

As of r820148 the PRESUBMIT is tripping on bogus grd files only
used for the purposes of testing. With the following error:

[Errno 2] No such file or directory: u'/../ui/webui/resources/tools/tests/foo_resources.grdp'

Fix by explicitly ignoring such grd files from the PRESUBMIT checks.

Bug: 1132403
Change-Id: I4a8b1f2b69c7bec6e26bf7a1a0790969d1b57bfe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2495320
Auto-Submit: dpapad <dpapad@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820308}
parent 020e97a3
...@@ -5197,6 +5197,12 @@ def CheckTranslationExpectations(input_api, output_api, ...@@ -5197,6 +5197,12 @@ def CheckTranslationExpectations(input_api, output_api,
if not grd_files: if not grd_files:
grd_files = git_helper.list_grds_in_repository(repo_root) grd_files = git_helper.list_grds_in_repository(repo_root)
# Ignore bogus grd files used only for testing
# ui/webui/resoucres/tools/generate_grd.py.
ignore_path = input_api.os_path.join(
'ui', 'webui', 'resources', 'tools', 'tests')
grd_files = filter(lambda p: ignore_path not in p, grd_files)
try: try:
translation_helper.get_translatable_grds(repo_root, grd_files, translation_helper.get_translatable_grds(repo_root, grd_files,
translation_expectations_path) translation_expectations_path)
......
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