Commit 421a7ac5 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Update CheckNoContentUnitTestsInChrome presubmit check.

It should check BUILD.gn files instead of GYP files.

Change-Id: I83c9d454dd876ce1808dc7c3439b8c6238d4ebf9
Reviewed-on: https://chromium-review.googlesource.com/762150
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515895}
parent 6c564a2f
...@@ -47,7 +47,7 @@ def _CheckNoContentUnitTestsInChrome(input_api, output_api): ...@@ -47,7 +47,7 @@ def _CheckNoContentUnitTestsInChrome(input_api, output_api):
"""Makes sure that no unit tests from content/ are included in unit_tests.""" """Makes sure that no unit tests from content/ are included in unit_tests."""
problems = [] problems = []
for f in input_api.AffectedFiles(): for f in input_api.AffectedFiles():
if not f.LocalPath().endswith('chrome_tests.gypi'): if not f.LocalPath().endswith('BUILD.gn'):
continue continue
for line_num, line in f.ChangedContents(): for line_num, line in f.ChangedContents():
...@@ -59,7 +59,7 @@ def _CheckNoContentUnitTestsInChrome(input_api, output_api): ...@@ -59,7 +59,7 @@ def _CheckNoContentUnitTestsInChrome(input_api, output_api):
return [] return []
return [output_api.PresubmitPromptWarning( return [output_api.PresubmitPromptWarning(
'Unit tests located in content/ should be added to the ' + 'Unit tests located in content/ should be added to the ' +
'content_tests.gypi:content_unittests target.', 'content_unittests target.',
items=problems)] items=problems)]
......
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