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

Side by Side Diff: tools/checklicenses/checklicenses.py

Issue 7887055: Update checklicenses to pass. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more precise Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Makes sure that all files contain proper licensing information.""" 6 """Makes sure that all files contain proper licensing information."""
7 7
8 8
9 import optparse 9 import optparse
10 import os.path 10 import os.path
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 'UNKNOWN', 185 'UNKNOWN',
186 ], 186 ],
187 'third_party/ffmpeg': [ 187 'third_party/ffmpeg': [
188 'GPL', 188 'GPL',
189 'GPL (v2 or later)', 189 'GPL (v2 or later)',
190 'UNKNOWN', 190 'UNKNOWN',
191 ], 191 ],
192 'third_party/gles2_book': [ 192 'third_party/gles2_book': [
193 'UNKNOWN', 193 'UNKNOWN',
194 ], 194 ],
195 'third_party/gles2_conform/GTF_ES': [
196 'UNKNOWN',
197 ],
195 'third_party/gpsd/release-2.38/gps.h': [ 198 'third_party/gpsd/release-2.38/gps.h': [
196 'UNKNOWN', 199 'UNKNOWN',
197 ], 200 ],
198 'third_party/harfbuzz': [ 201 'third_party/harfbuzz': [
199 'UNKNOWN', 202 'UNKNOWN',
200 ], 203 ],
201 'third_party/hunspell': [ 204 'third_party/hunspell': [
202 'UNKNOWN', 205 'UNKNOWN',
203 ], 206 ],
204 'third_party/hyphen': [ 207 'third_party/hyphen': [
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 ], 363 ],
361 'tools/emacs': [ 364 'tools/emacs': [
362 'UNKNOWN', 365 'UNKNOWN',
363 ], 366 ],
364 'tools/grit/grit/node/custom/__init__.py': [ 367 'tools/grit/grit/node/custom/__init__.py': [
365 'UNKNOWN', 368 'UNKNOWN',
366 ], 369 ],
367 'tools/gyp/test': [ 370 'tools/gyp/test': [
368 'UNKNOWN', 371 'UNKNOWN',
369 ], 372 ],
373 'tools/histograms': [
374 'UNKNOWN',
375 ],
370 'tools/memory_watcher': [ 376 'tools/memory_watcher': [
371 'UNKNOWN', 377 'UNKNOWN',
372 ], 378 ],
373 'tools/playback_benchmark': [ 379 'tools/playback_benchmark': [
374 'UNKNOWN', 380 'UNKNOWN',
375 ], 381 ],
376 'tools/python/google/__init__.py': [ 382 'tools/python/google/__init__.py': [
377 'UNKNOWN', 383 'UNKNOWN',
378 ], 384 ],
379 'tools/site_compare': [ 385 'tools/site_compare': [
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 print stderr 435 print stderr
430 print '--------- end licensecheck stderr ---------' 436 print '--------- end licensecheck stderr ---------'
431 print "\nFAILED\n" 437 print "\nFAILED\n"
432 sys.exit(1) 438 sys.exit(1)
433 439
434 success = True 440 success = True
435 for line in stdout.splitlines(): 441 for line in stdout.splitlines():
436 filename, license = line.split(':', 1) 442 filename, license = line.split(':', 1)
437 filename = os.path.relpath(filename.strip(), options.base_directory) 443 filename = os.path.relpath(filename.strip(), options.base_directory)
438 444
445 # All files in the build output directory are generated one way or another.
446 # There's no need to check them.
447 if filename.startswith('out/') or filename.startswith('sconsbuild/'):
448 continue
449
439 # For now we're just interested in the license. 450 # For now we're just interested in the license.
440 license = license.replace('*No copyright*', '').strip() 451 license = license.replace('*No copyright*', '').strip()
441 452
442 # Skip generated files. 453 # Skip generated files.
443 if 'GENERATED FILE' in license: 454 if 'GENERATED FILE' in license:
444 continue 455 continue
445 456
446 if license in WHITELISTED_LICENSES: 457 if license in WHITELISTED_LICENSES:
447 continue 458 continue
448 459
(...skipping 23 matching lines...) Expand all
472 option_parser = optparse.OptionParser() 483 option_parser = optparse.OptionParser()
473 option_parser.add_option('--root', default=default_root, 484 option_parser.add_option('--root', default=default_root,
474 dest='base_directory', 485 dest='base_directory',
475 help='Specifies the repository root. This defaults ' 486 help='Specifies the repository root. This defaults '
476 'to "../.." relative to the script file, which ' 487 'to "../.." relative to the script file, which '
477 'will normally be the repository root.') 488 'will normally be the repository root.')
478 option_parser.add_option('-v', '--verbose', action='store_true', 489 option_parser.add_option('-v', '--verbose', action='store_true',
479 default=False, help='Print debug logging') 490 default=False, help='Print debug logging')
480 options, args = option_parser.parse_args() 491 options, args = option_parser.parse_args()
481 main(options, args) 492 main(options, args)
OLDNEW
« 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