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

Side by Side Diff: PRESUBMIT.py

Issue 710703002: Revert "Teach PRESUBMIT.py how to run gn check for most of the mojo repo" (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « no previous file | mojo/application/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 relative_out_dir = input_api.os_path.relpath(out_dir, temp_parent) 437 relative_out_dir = input_api.os_path.relpath(out_dir, temp_parent)
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 '//build/*',
448 '//mojo/application/*',
449 '//mojo/apps/*',
450 '//mojo/aura/*',
451 '//mojo/cc/*',
452 '//mojo/common/*',
453 '//mojo/public/*', 447 '//mojo/public/*',
454 '//mojo/spy/*',
455 '//mojo/tools/*',
456 '//mojo/views/*',
457 '//skia/*',
458 '//testing/*',
459 '//tools/*',
460 '//ui/*',
461 ] 448 ]
462 if input_api.platform != 'win32': 449 if input_api.platform != 'win32':
463 KNOWN_PASSING += [ 450 KNOWN_PASSING += [
464 '//sky/*', 451 '//sky/*',
465 ] 452 ]
466 for target_filter in KNOWN_PASSING: 453 for target_filter in KNOWN_PASSING:
467 try: 454 try:
468 input_api.subprocess.check_output(['gn', 'check', relative_out_dir, 455 input_api.subprocess.check_output(['gn', 'check', relative_out_dir,
469 target_filter]) 456 target_filter])
470 except input_api.subprocess.CalledProcessError, error: 457 except input_api.subprocess.CalledProcessError, error:
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1775 builders.extend(['cros_x86']) 1762 builders.extend(['cros_x86'])
1776 1763
1777 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it 1764 # The AOSP bot doesn't build the chrome/ layer, so ignore any changes to it
1778 # unless they're .gyp(i) files as changes to those files can break the gyp 1765 # unless they're .gyp(i) files as changes to those files can break the gyp
1779 # step on that bot. 1766 # step on that bot.
1780 if (not all(re.search('^chrome', f) for f in files) or 1767 if (not all(re.search('^chrome', f) for f in files) or
1781 any(re.search('\.gypi?$', f) for f in files)): 1768 any(re.search('\.gypi?$', f) for f in files)):
1782 builders.extend(['android_aosp']) 1769 builders.extend(['android_aosp'])
1783 1770
1784 return GetDefaultTryConfigs(builders) 1771 return GetDefaultTryConfigs(builders)
OLDNEW
« no previous file with comments | « no previous file | mojo/application/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698