Delete chrome.mediaGalleriesPrivate because the functionality unique to it has since...
[chromium-blink-merge.git] / tools / android / findbugs_plugin / test / run_findbugs_plugin_tests.py
bloba570cdb6045446a32e6836247dc231d27cb22d6b
1 #!/usr/bin/env python
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 # This is used to test the findbugs plugin, it calls
8 # build/android/pylib/utils/findbugs.py to analyze the classes in
9 # org.chromium.tools.findbugs.plugin package, and expects to get the same
10 # issue with those in expected_result.txt.
12 # Useful command line:
13 # --rebaseline to generate the expected_result.txt, please make sure don't
14 # remove the expected result of exsting tests.
17 import optparse
18 import os
19 import sys
21 sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),
22 '..', '..', '..', '..',
23 'build', 'android')))
25 from pylib import constants
26 from pylib.utils import findbugs
29 def main(argv):
30 parser = findbugs.GetCommonParser()
32 options, _ = parser.parse_args()
34 if not options.known_bugs:
35 options.known_bugs = os.path.join(constants.DIR_SOURCE_ROOT, 'tools',
36 'android', 'findbugs_plugin', 'test',
37 'expected_result.txt')
39 if not options.only_analyze:
40 options.only_analyze = 'org.chromium.tools.findbugs.plugin.*'
42 # crbug.com/449101
43 # Temporary workaround to have the Android Clang Builder (dbg) bot
44 # pass the findbugs_tests step.
45 if not options.exclude:
46 options.exclude = os.path.join(constants.DIR_SOURCE_ROOT, 'build',
47 'android', 'findbugs_filter',
48 'findbugs_exclude.xml')
50 return findbugs.Run(options)
52 if __name__ == '__main__':
53 sys.exit(main(sys.argv))