summaryrefslogtreecommitdiff
path: root/chromium/buildtools/checkdeps
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/buildtools/checkdeps
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/buildtools/checkdeps')
-rwxr-xr-xchromium/buildtools/checkdeps/builddeps.py5
-rwxr-xr-xchromium/buildtools/checkdeps/checkdeps.py5
-rw-r--r--chromium/buildtools/checkdeps/rules.py8
3 files changed, 14 insertions, 4 deletions
diff --git a/chromium/buildtools/checkdeps/builddeps.py b/chromium/buildtools/checkdeps/builddeps.py
index 2dc9351ff83..519228df241 100755
--- a/chromium/buildtools/checkdeps/builddeps.py
+++ b/chromium/buildtools/checkdeps/builddeps.py
@@ -93,7 +93,8 @@ class DepsBuilder(object):
Args:
base_directory: local path to root of checkout, e.g. C:\chr\src.
verbose: Set to True for debug output.
- being_tested: Set to True to ignore the DEPS file at tools/checkdeps/DEPS.
+ being_tested: Set to True to ignore the DEPS file at
+ buildtools/checkdeps/DEPS.
ignore_temp_rules: Ignore rules that start with Rule.TEMP_ALLOW ("!").
"""
base_directory = (base_directory or
@@ -236,7 +237,7 @@ class DepsBuilder(object):
deps_file_path = os.path.join(dir_path_local_abs, 'DEPS')
# The second conditional here is to disregard the
- # tools/checkdeps/DEPS file while running tests. This DEPS file
+ # buildtools/checkdeps/DEPS file while running tests. This DEPS file
# has a skip_child_includes for 'testdata' which is necessary for
# running production tests, since there are intentional DEPS
# violations under the testdata directory. On the other hand when
diff --git a/chromium/buildtools/checkdeps/checkdeps.py b/chromium/buildtools/checkdeps/checkdeps.py
index f4777abb3a2..4713dc0f3a6 100755
--- a/chromium/buildtools/checkdeps/checkdeps.py
+++ b/chromium/buildtools/checkdeps/checkdeps.py
@@ -51,7 +51,8 @@ class DepsChecker(DepsBuilder):
Args:
base_directory: OS-compatible path to root of checkout, e.g. C:\chr\src.
verbose: Set to true for debug output.
- being_tested: Set to true to ignore the DEPS file at tools/checkdeps/DEPS.
+ being_tested: Set to true to ignore the DEPS file at
+ buildtools/checkdeps/DEPS.
ignore_temp_rules: Ignore rules that start with Rule.TEMP_ALLOW ("!").
"""
DepsBuilder.__init__(
@@ -188,7 +189,7 @@ def PrintUsage():
--root ROOT Specifies the repository root. This defaults to "../../.."
relative to the script file. This will be correct given the
- normal location of the script in "<root>/tools/checkdeps".
+ normal location of the script in "<root>/buildtools/checkdeps".
--(others) There are a few lesser-used options; run with --help to show them.
diff --git a/chromium/buildtools/checkdeps/rules.py b/chromium/buildtools/checkdeps/rules.py
index 199c18f3677..dd3884db223 100644
--- a/chromium/buildtools/checkdeps/rules.py
+++ b/chromium/buildtools/checkdeps/rules.py
@@ -74,6 +74,14 @@ def ParseRuleString(rule_string, source):
'The rule string "%s" does not begin with a "+", "-" or "!".' %
rule_string)
+ # If a directory is specified in a DEPS file with a trailing slash, then it
+ # will not match as a parent directory in Rule's [Parent|Child]OrMatch above.
+ # Ban them.
+ if rule_string[-1] == '/':
+ raise Exception(
+ 'The rule string "%s" ends with a "/" which is not allowed' %
+ rule_string)
+
return rule_string[0], rule_string[1:]