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

Unified Diff: tools/checklicenses/checklicenses.py

Issue 1329243002: Excluded sysroot directories from checklicences.py (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a excluded path list. Created 5 years, 3 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/checklicenses/checklicenses.py
diff --git a/tools/checklicenses/checklicenses.py b/tools/checklicenses/checklicenses.py
index 2cbb61b13daa1b26b389f2a899845eb4f1c778da..ac44de59705d1f726e8e146a21a42fd15a979048 100755
--- a/tools/checklicenses/checklicenses.py
+++ b/tools/checklicenses/checklicenses.py
@@ -548,6 +548,17 @@ PATH_SPECIFIC_WHITELISTED_LICENSES = {
],
}
+EXCLUDED_PATHS = [
+ # Don't check generated files
+ 'out/',
+
+ # Don't check sysroot directories
+ 'build/linux/debian_wheezy_amd64-sysroot',
+ 'build/linux/debian_wheezy_arm-sysroot',
+ 'build/linux/debian_wheezy_i386-sysroot',
+ 'build/linux/debian_wheezy_mips-sysroot',
+]
+
def check_licenses(options, args):
# Figure out which directory we have to check.
@@ -596,9 +607,8 @@ def check_licenses(options, args):
filename, license = line.split(':', 1)
filename = os.path.relpath(filename.strip(), options.base_directory)
- # All files in the build output directory are generated one way or another.
- # There's no need to check them.
- if filename.startswith('out/'):
+ # Check if the file belongs to one of the excluded paths.
+ if any((filename.startswith(path) for path in EXCLUDED_PATHS)):
continue
# For now we're just interested in the license.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698