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

Unified Diff: build/android/pylib/utils/findbugs.py

Issue 11967019: [Android] Sever findbugs dependencies on environment variables. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fit nits Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/findbugs.py ('k') | tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/utils/findbugs.py
diff --git a/build/android/pylib/findbugs.py b/build/android/pylib/utils/findbugs.py
similarity index 93%
rename from build/android/pylib/findbugs.py
rename to build/android/pylib/utils/findbugs.py
index 996c0eeaaf9afd83343a4f4cde22f8a6ceb5b5a8..3ad2c5a196b4a152a2d59ff7335193289de9028b 100755
--- a/build/android/pylib/findbugs.py
+++ b/build/android/pylib/utils/findbugs.py
@@ -11,6 +11,8 @@ import shlex
import subprocess
import sys
+from pylib import constants
+
def _PrintMessage(warnings, title, action, known_bugs_file):
if warnings:
@@ -66,11 +68,10 @@ def _Rebaseline(current_warnings_set, known_bugs_file):
def _GetChromeClasses(release_version):
- chrome_src = os.getenv('CHROME_SRC')
version = 'Debug'
if release_version:
version = 'Release'
- path = os.path.join(chrome_src, 'out', version)
+ path = os.path.join(constants.CHROME_DIR, 'out', version)
cmd = 'find %s -name "*.class"' % path
proc = subprocess.Popen(shlex.split(cmd),
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
@@ -99,9 +100,9 @@ def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes,
findbug_args: addtional command line options needs pass to Findbugs.
"""
- chrome_src = os.getenv('CHROME_SRC')
- sdk_root = os.getenv('ANDROID_SDK_ROOT')
- sdk_version = os.getenv('ANDROID_SDK_VERSION')
+ chrome_src = constants.CHROME_DIR
+ sdk_root = constants.ANDROID_SDK_ROOT
+ sdk_version = constants.ANDROID_SDK_VERSION
system_classes = []
system_classes.append(os.path.join(sdk_root, 'platforms',
@@ -222,13 +223,6 @@ def GetCommonParser():
return parser
-def CheckEnvironment():
- if not (os.getenv('CHROME_SRC') and os.getenv('ANDROID_SDK_ROOT') and
- os.getenv('ANDROID_SDK_VERSION')):
- print 'Your build environment is not set up correctly.'
- print 'Please source build/android/envsetup.sh.'
- return False
- return True
def main(argv):
parser = GetCommonParser()
@@ -236,5 +230,6 @@ def main(argv):
return Run(options)
+
if __name__ == '__main__':
sys.exit(main(sys.argv))
« no previous file with comments | « build/android/pylib/findbugs.py ('k') | tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698