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

Side by Side Diff: tools/diagnose-me.py

Issue 40603004: Add 'quick-check' option to install-build-deps.sh (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review update Created 7 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 | Annotate | Revision Log
« no previous file with comments | « build/install-build-deps.sh ('k') | 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) 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 """Diagnose some common system configuration problems on Linux, and 6 """Diagnose some common system configuration problems on Linux, and
7 suggest fixes.""" 7 suggest fixes."""
8 8
9 import os 9 import os
10 import subprocess 10 import subprocess
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 proc = subprocess.Popen(['which', 'ninja'], stdout=subprocess.PIPE) 72 proc = subprocess.Popen(['which', 'ninja'], stdout=subprocess.PIPE)
73 stdout = proc.communicate()[0] 73 stdout = proc.communicate()[0]
74 if not 'depot_tools' in stdout: 74 if not 'depot_tools' in stdout:
75 return ("The ninja binary in your path isn't from depot_tools:\n" 75 return ("The ninja binary in your path isn't from depot_tools:\n"
76 + " " + stdout + 76 + " " + stdout +
77 "Remove custom ninjas from your path so that the one\n" 77 "Remove custom ninjas from your path so that the one\n"
78 "in depot_tools is used.\n") 78 "in depot_tools is used.\n")
79 return None 79 return None
80 80
81 81
82 @Check("build dependencies are satisfied")
83 def CheckBuildDeps():
84 script_path = os.path.join(
85 os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'build',
86 'install-build-deps.sh')
87 proc = subprocess.Popen([script_path, '--quick-check'],
88 stdout=subprocess.PIPE)
89 stdout = proc.communicate()[0]
90 if 'WARNING' in stdout:
91 return ("Your build dependencies are out-of-date.\n"
92 "Run '" + script_path + "' to update.")
93 return None
94
95
82 def RunChecks(): 96 def RunChecks():
83 for name, check in all_checks: 97 for name, check in all_checks:
84 sys.stdout.write("* Checking %s: " % name) 98 sys.stdout.write("* Checking %s: " % name)
85 sys.stdout.flush() 99 sys.stdout.flush()
86 error = check() 100 error = check()
87 if not error: 101 if not error:
88 print "ok" 102 print "ok"
89 else: 103 else:
90 print "FAIL" 104 print "FAIL"
91 print error 105 print error
92 106
93 107
94 if __name__ == '__main__': 108 if __name__ == '__main__':
95 RunChecks() 109 RunChecks()
OLDNEW
« no previous file with comments | « build/install-build-deps.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698