Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 ], | 325 ], |
| 326 'third_party/ocmock/OCMock': [ # http://crbug.com/98454 | 326 'third_party/ocmock/OCMock': [ # http://crbug.com/98454 |
| 327 'UNKNOWN', | 327 'UNKNOWN', |
| 328 ], | 328 ], |
| 329 'third_party/opus/src': [ # http://crbug.com/156738 | 329 'third_party/opus/src': [ # http://crbug.com/156738 |
| 330 'UNKNOWN', | 330 'UNKNOWN', |
| 331 ], | 331 ], |
| 332 'third_party/ply/__init__.py': [ | 332 'third_party/ply/__init__.py': [ |
| 333 'UNKNOWN', | 333 'UNKNOWN', |
| 334 ], | 334 ], |
| 335 'third_party/pexpect': [ # http://crbug.com/156113 | |
|
Paweł Hajdan Jr.
2012/11/08 17:42:04
Yay, removing an excpetion. Awesome!
bulach
2012/11/08 17:45:36
:)
| |
| 336 'UNKNOWN', | |
| 337 ], | |
| 338 'third_party/protobuf': [ # http://crbug.com/98455 | 335 'third_party/protobuf': [ # http://crbug.com/98455 |
| 339 'UNKNOWN', | 336 'UNKNOWN', |
| 340 ], | 337 ], |
| 341 'third_party/pylib': [ | 338 'third_party/pylib': [ |
| 342 'UNKNOWN', | 339 'UNKNOWN', |
| 343 ], | 340 ], |
| 344 'third_party/scons-2.0.1/engine/SCons': [ # http://crbug.com/98462 | 341 'third_party/scons-2.0.1/engine/SCons': [ # http://crbug.com/98462 |
| 345 'UNKNOWN', | 342 'UNKNOWN', |
| 346 ], | 343 ], |
| 347 'third_party/simplejson': [ | 344 'third_party/simplejson': [ |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 448 | 445 |
| 449 print "Using base directory:", options.base_directory | 446 print "Using base directory:", options.base_directory |
| 450 print "Checking:", start_dir | 447 print "Checking:", start_dir |
| 451 print | 448 print |
| 452 | 449 |
| 453 licensecheck_path = os.path.abspath(os.path.join(options.base_directory, | 450 licensecheck_path = os.path.abspath(os.path.join(options.base_directory, |
| 454 'third_party', | 451 'third_party', |
| 455 'devscripts', | 452 'devscripts', |
| 456 'licensecheck.pl')) | 453 'licensecheck.pl')) |
| 457 | 454 |
| 458 licensecheck = subprocess.Popen([licensecheck_path, '-r', start_dir], | 455 licensecheck = subprocess.Popen([licensecheck_path, |
| 456 '-l', '100', | |
|
Paweł Hajdan Jr.
2012/11/08 17:42:04
Just checking: do you need this? If so, OK.
bulach
2012/11/08 17:45:36
yes, this is needed: sorry, I forgot to update the
| |
| 457 '-r', start_dir], | |
| 459 stdout=subprocess.PIPE, | 458 stdout=subprocess.PIPE, |
| 460 stderr=subprocess.PIPE) | 459 stderr=subprocess.PIPE) |
| 461 stdout, stderr = licensecheck.communicate() | 460 stdout, stderr = licensecheck.communicate() |
| 462 if options.verbose: | 461 if options.verbose: |
| 463 print '----------- licensecheck stdout -----------' | 462 print '----------- licensecheck stdout -----------' |
| 464 print stdout | 463 print stdout |
| 465 print '--------- end licensecheck stdout ---------' | 464 print '--------- end licensecheck stdout ---------' |
| 466 if licensecheck.returncode != 0 or stderr: | 465 if licensecheck.returncode != 0 or stderr: |
| 467 print '----------- licensecheck stderr -----------' | 466 print '----------- licensecheck stderr -----------' |
| 468 print stderr | 467 print stderr |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 531 option_parser.add_option('--ignore-suppressions', | 530 option_parser.add_option('--ignore-suppressions', |
| 532 action='store_true', | 531 action='store_true', |
| 533 default=False, | 532 default=False, |
| 534 help='Ignore path-specific license whitelist.') | 533 help='Ignore path-specific license whitelist.') |
| 535 options, args = option_parser.parse_args() | 534 options, args = option_parser.parse_args() |
| 536 return check_licenses(options, args) | 535 return check_licenses(options, args) |
| 537 | 536 |
| 538 | 537 |
| 539 if '__main__' == __name__: | 538 if '__main__' == __name__: |
| 540 sys.exit(main()) | 539 sys.exit(main()) |
| OLD | NEW |