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

Unified Diff: tools-webrtc/check_package_boundaries.py

Issue 2695573003: Fix check_package_boundaries presubmit test for Windows. (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | tools-webrtc/check_package_boundaries_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools-webrtc/check_package_boundaries.py
diff --git a/tools-webrtc/check_package_boundaries.py b/tools-webrtc/check_package_boundaries.py
index 75588fa7d880ffd044e9234caafdf6bc262c42a8..eb791fffb27e3ea5252c345fe705e19b00c70628 100644
--- a/tools-webrtc/check_package_boundaries.py
+++ b/tools-webrtc/check_package_boundaries.py
@@ -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)
« no previous file with comments | « no previous file | tools-webrtc/check_package_boundaries_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698