| OLD | NEW |
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Top-level presubmit script for Chromium. | 5 """Top-level presubmit script for Chromium. |
| 6 | 6 |
| 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts | 7 See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts |
| 8 for more details about the presubmit API built into gcl. | 8 for more details about the presubmit API built into gcl. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 try: | 438 try: |
| 439 input_api.subprocess.check_output(['gn', 'gen', relative_out_dir]) | 439 input_api.subprocess.check_output(['gn', 'gen', relative_out_dir]) |
| 440 except input_api.subprocess.CalledProcessError, error: | 440 except input_api.subprocess.CalledProcessError, error: |
| 441 return [output_api.PresubmitError( | 441 return [output_api.PresubmitError( |
| 442 'gn gen must not fail.', long_text=error.output)] | 442 'gn gen must not fail.', long_text=error.output)] |
| 443 | 443 |
| 444 # TODO(eseidel): Currently only these are known to pass, | 444 # TODO(eseidel): Currently only these are known to pass, |
| 445 # once everything passes we can just call 'gn check' once without a filter! | 445 # once everything passes we can just call 'gn check' once without a filter! |
| 446 KNOWN_PASSING = [ | 446 KNOWN_PASSING = [ |
| 447 '//examples/*', | 447 '//examples/*', |
| 448 '//mojo/aura/*', | 448 '//mojo/*', |
| 449 '//mojo/application/*', | |
| 450 '//mojo/application_manager/*', | |
| 451 '//mojo/cc/*', | |
| 452 '//mojo/common/*', | |
| 453 '//mojo/converters/*', | |
| 454 '//mojo/edk/*', | |
| 455 '//mojo/environment/*', | |
| 456 '//mojo/gles2/*', | |
| 457 '//mojo/gpu/*', | |
| 458 '//mojo/public/*', | |
| 459 '//mojo/services/*', | |
| 460 '//mojo/skia/*', | |
| 461 '//mojo/spy/*', | |
| 462 '//mojo/tools/*', | |
| 463 '//mojo/views/*', | |
| 464 '//services/*', | 449 '//services/*', |
| 465 ] | 450 ] |
| 466 if input_api.platform != 'win32': | 451 if input_api.platform != 'win32': |
| 467 KNOWN_PASSING += [ | 452 KNOWN_PASSING += [ |
| 468 '//sky/*', | 453 '//sky/*', |
| 469 ] | 454 ] |
| 470 for target_filter in KNOWN_PASSING: | 455 for target_filter in KNOWN_PASSING: |
| 471 try: | 456 try: |
| 472 input_api.subprocess.check_output(['gn', 'check', relative_out_dir, | 457 input_api.subprocess.check_output(['gn', 'check', relative_out_dir, |
| 473 target_filter]) | 458 target_filter]) |
| (...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1613 files = change.LocalPaths() | 1598 files = change.LocalPaths() |
| 1614 | 1599 |
| 1615 if not files or all(re.search(r'[\\\/]OWNERS$', f) for f in files): | 1600 if not files or all(re.search(r'[\\\/]OWNERS$', f) for f in files): |
| 1616 return {} | 1601 return {} |
| 1617 | 1602 |
| 1618 builders = [ | 1603 builders = [ |
| 1619 'Mojo Linux Try', | 1604 'Mojo Linux Try', |
| 1620 ] | 1605 ] |
| 1621 | 1606 |
| 1622 return GetDefaultTryConfigs(builders) | 1607 return GetDefaultTryConfigs(builders) |
| OLD | NEW |