Fix check_package_boundaries presubmit test for Windows.
BUG=webrtc:6954 NOTRY=True Review-Url: https://codereview.webrtc.org/2695573003 Cr-Commit-Position: refs/heads/master@{#16581}
This commit is contained in:
@ -54,11 +54,11 @@ class Logger(object):
|
||||
def _BuildSubpackagesPattern(packages, query):
|
||||
"""Returns a regular expression that matches source files inside subpackages
|
||||
of the given query."""
|
||||
query += '/'
|
||||
query += os.path.sep
|
||||
length = len(query)
|
||||
pattern = r'(?P<line_number>\d+)\$\s*"(?P<source_file>(?P<subpackage>'
|
||||
pattern += '|'.join(package[length:] for package in packages
|
||||
if package.startswith(query))
|
||||
pattern += '|'.join(package[length:].replace(os.path.sep, '/')
|
||||
for package in packages if package.startswith(query))
|
||||
pattern += r')/[\w\./]*)"'
|
||||
return re.compile(pattern)
|
||||
|
||||
|
Reference in New Issue
Block a user