diff options
author | navabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-30 18:35:11 +0000 |
---|---|---|
committer | navabi@google.com <navabi@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-30 18:35:11 +0000 |
commit | 91419219bd1d98ce90ab87688069fb0781855dab (patch) | |
tree | 7ac86eca9b0f86f5974e0dbb76b3c343ce64d79e /build/android/pylib | |
parent | dd27d66989264f15926a133bffad1f266b188f5e (diff) | |
download | chromium_src-91419219bd1d98ce90ab87688069fb0781855dab.zip chromium_src-91419219bd1d98ce90ab87688069fb0781855dab.tar.gz chromium_src-91419219bd1d98ce90ab87688069fb0781855dab.tar.bz2 |
Revert "Don't hardcode output directory in findbugs.py"
This reverts commit 42e7514f5c983268e38ff8773cd6544af081ebab.
It is breaking the bots like this:
https://chromegw.corp.google.com/i/clank/builders/clang-builder/builds/3819
Traceback (most recent call last):
...
Exception: The BUILDTYPE environment variable has not been set
The reason is that the downstream clang-builder uses recipes, and recipes don't
set environment variables between steps. The recipe being used is
android_builder which can be checkout as part of the buildbot code in dir:
build/scripts/slave/recipes/android/.
TBR=andrewhayden@google.com
BUG=357190
Review URL: https://codereview.chromium.org/217893002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260458 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/pylib')
-rw-r--r-- | build/android/pylib/utils/findbugs.py | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/build/android/pylib/utils/findbugs.py b/build/android/pylib/utils/findbugs.py index 7275322..fb67268 100644 --- a/build/android/pylib/utils/findbugs.py +++ b/build/android/pylib/utils/findbugs.py @@ -66,8 +66,11 @@ def _Rebaseline(current_warnings_set, known_bugs_file): return 0 -def _GetChromeClasses(): - path = constants.GetOutDirectory() +def _GetChromeClasses(release_version): + version = 'Debug' + if release_version: + version = 'Release' + path = os.path.join(constants.DIR_SOURCE_ROOT, 'out', version) cmd = 'find %s -name "*.class"' % path out = cmd_helper.GetCmdOutput(shlex.split(cmd)) if not out: @@ -76,7 +79,7 @@ def _GetChromeClasses(): def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes, - rebaseline, findbug_args): + rebaseline, release_version, findbug_args): """Run the FindBugs. Args: @@ -88,6 +91,8 @@ def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes, auxiliary_classes: the classes help to analyze, refer to FindBug's -auxclasspath command line option. rebaseline: True if the known_bugs file needs rebaseline. + release_version: True if the release version needs check, otherwise check + debug version. findbug_args: addtional command line options needs pass to Findbugs. """ @@ -130,7 +135,7 @@ def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes, if findbug_args: cmd = '%s %s ' % (cmd, findbug_args) - chrome_classes = _GetChromeClasses() + chrome_classes = _GetChromeClasses(release_version) if not chrome_classes: return 1 cmd = '%s %s ' % (cmd, chrome_classes) @@ -163,7 +168,7 @@ def Run(options): if options.auxclasspath: auxclasspath = options.auxclasspath.split(':') return _Run(exclude_file, known_bugs_file, options.only_analyze, auxclasspath, - options.rebaseline, options.findbug_args) + options.rebaseline, options.release_build, options.findbug_args) def GetCommonParser(): @@ -202,6 +207,12 @@ def GetCommonParser(): dest='known_bugs', help='Not report the bugs in the given file.') + parser.add_option('-l', + '--release-build', + action='store_true', + dest='release_build', + help='Analyze release build instead of debug.') + parser.add_option('-f', '--findbug-args', action='store', |