diff options
author | andrewhayden@chromium.org <andrewhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-28 17:11:36 +0000 |
---|---|---|
committer | andrewhayden@chromium.org <andrewhayden@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-28 17:11:36 +0000 |
commit | 42e7514f5c983268e38ff8773cd6544af081ebab (patch) | |
tree | ad85738ef80c67bf8bc6d0ea8ddcfb1a6946cc01 /build/android | |
parent | b89ca2e49c322f2b8887c48c3ce5db7493ca8d2a (diff) | |
download | chromium_src-42e7514f5c983268e38ff8773cd6544af081ebab.zip chromium_src-42e7514f5c983268e38ff8773cd6544af081ebab.tar.gz chromium_src-42e7514f5c983268e38ff8773cd6544af081ebab.tar.bz2 |
Don't hardcode output directory in findbugs.py
BUG=357190
Review URL: https://codereview.chromium.org/212173006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260178 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android')
-rwxr-xr-x | build/android/buildbot/bb_host_steps.py | 9 | ||||
-rw-r--r-- | build/android/pylib/utils/findbugs.py | 21 |
2 files changed, 9 insertions, 21 deletions
diff --git a/build/android/buildbot/bb_host_steps.py b/build/android/buildbot/bb_host_steps.py index b2bda6c..48d2d9a 100755 --- a/build/android/buildbot/bb_host_steps.py +++ b/build/android/buildbot/bb_host_steps.py @@ -80,14 +80,12 @@ def ExtractBuild(options): def FindBugs(options): + _ = options # keeps the linter and findbugs happy, parameter is not used bb_annotations.PrintNamedStep('findbugs') - build_type = [] - if options.target == 'Release': - build_type = ['--release-build'] - RunCmd([SrcPath('build', 'android', 'findbugs_diff.py')] + build_type) + RunCmd([SrcPath('build', 'android', 'findbugs_diff.py')]) RunCmd([SrcPath( 'tools', 'android', 'findbugs_plugin', 'test', - 'run_findbugs_plugin_tests.py')] + build_type) + 'run_findbugs_plugin_tests.py')]) def BisectPerfRegression(options): @@ -134,6 +132,7 @@ def main(argv): setattr(options, 'target', options.factory_properties.get('target', 'Debug')) setattr(options, 'extra_src', options.factory_properties.get('extra_src', '')) + constants.SetBuildType(options.target) if options.steps: bb_utils.RunSteps(options.steps.split(','), GetHostStepCmds(), options) diff --git a/build/android/pylib/utils/findbugs.py b/build/android/pylib/utils/findbugs.py index fb67268..7275322 100644 --- a/build/android/pylib/utils/findbugs.py +++ b/build/android/pylib/utils/findbugs.py @@ -66,11 +66,8 @@ def _Rebaseline(current_warnings_set, known_bugs_file): return 0 -def _GetChromeClasses(release_version): - version = 'Debug' - if release_version: - version = 'Release' - path = os.path.join(constants.DIR_SOURCE_ROOT, 'out', version) +def _GetChromeClasses(): + path = constants.GetOutDirectory() cmd = 'find %s -name "*.class"' % path out = cmd_helper.GetCmdOutput(shlex.split(cmd)) if not out: @@ -79,7 +76,7 @@ def _GetChromeClasses(release_version): def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes, - rebaseline, release_version, findbug_args): + rebaseline, findbug_args): """Run the FindBugs. Args: @@ -91,8 +88,6 @@ 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. """ @@ -135,7 +130,7 @@ def _Run(exclude, known_bugs, classes_to_analyze, auxiliary_classes, if findbug_args: cmd = '%s %s ' % (cmd, findbug_args) - chrome_classes = _GetChromeClasses(release_version) + chrome_classes = _GetChromeClasses() if not chrome_classes: return 1 cmd = '%s %s ' % (cmd, chrome_classes) @@ -168,7 +163,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.release_build, options.findbug_args) + options.rebaseline, options.findbug_args) def GetCommonParser(): @@ -207,12 +202,6 @@ 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', |