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

Side by Side Diff: build/android/gyp/ant.py

Issue 132463007: Enable presubmit pylint in build/android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase vs tot and only disabling F0401 in specific spots Created 6 years, 10 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
« no previous file with comments | « build/android/generate_emma_html.py ('k') | build/android/gyp/apk_install.py » ('j') | 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/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """An Ant wrapper that suppresses useless Ant output. 7 """An Ant wrapper that suppresses useless Ant output.
8 8
9 Ant build scripts output "BUILD SUCCESSFUL" and build timing at the end of 9 Ant build scripts output "BUILD SUCCESSFUL" and build timing at the end of
10 every build. In the Android build, this just adds a lot of useless noise to the 10 every build. In the Android build, this just adds a lot of useless noise to the
11 build output. This script forwards its arguments to ant, and prints Ant's 11 build output. This script forwards its arguments to ant, and prints Ant's
12 output up until the BUILD SUCCESSFUL line. 12 output up until the BUILD SUCCESSFUL line.
13 """ 13 """
14 14
15 import sys 15 import sys
16 import traceback 16 import traceback
17 17
18 from util import build_utils 18 from util import build_utils # pylint: disable=F0401
19 19
20 20
21 def main(argv): 21 def main(argv):
22 try: 22 try:
23 stdout = build_utils.CheckOutput(['ant'] + argv[1:]) 23 stdout = build_utils.CheckOutput(['ant'] + argv[1:])
24 except build_utils.CalledProcessError as e: 24 except build_utils.CalledProcessError as e:
25 traceback.print_exc() 25 traceback.print_exc()
26 if '-quiet' in e.args: 26 if '-quiet' in e.args:
27 sys.stderr.write('Tip: run the ant command above without the -quiet flag ' 27 sys.stderr.write('Tip: run the ant command above without the -quiet flag '
28 'to see more details on the error\n') 28 'to see more details on the error\n')
29 sys.exit(1) 29 sys.exit(1)
30 stdout = stdout.strip().split('\n') 30 stdout = stdout.strip().split('\n')
31 for line in stdout: 31 for line in stdout:
32 if line.strip() == 'BUILD SUCCESSFUL': 32 if line.strip() == 'BUILD SUCCESSFUL':
33 break 33 break
34 print line 34 print line
35 35
36 36
37 if __name__ == '__main__': 37 if __name__ == '__main__':
38 sys.exit(main(sys.argv)) 38 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/generate_emma_html.py ('k') | build/android/gyp/apk_install.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698