summaryrefslogtreecommitdiffstats
path: root/tools/android
diff options
context:
space:
mode:
authoryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-16 20:31:10 +0000
committeryfriedman@chromium.org <yfriedman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-16 20:31:10 +0000
commita403e54e5e101f60ff3ac7a2eaf3958bdac842e1 (patch)
tree6d4a7eff54d36ab99730867fa00f6f5880790a96 /tools/android
parentb47049a6e55ec20778869fd596694addb307aa75 (diff)
downloadchromium_src-a403e54e5e101f60ff3ac7a2eaf3958bdac842e1.zip
chromium_src-a403e54e5e101f60ff3ac7a2eaf3958bdac842e1.tar.gz
chromium_src-a403e54e5e101f60ff3ac7a2eaf3958bdac842e1.tar.bz2
[Android] Sever findbugs dependencies on environment variables.
Use pylib constants instead. Review URL: https://codereview.chromium.org/11967019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/android')
-rwxr-xr-xtools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py18
1 files changed, 7 insertions, 11 deletions
diff --git a/tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py b/tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py
index 1115192..f660f1f 100755
--- a/tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py
+++ b/tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py
@@ -5,7 +5,7 @@
# found in the LICENSE file.
# This is used to test the findbugs plugin, it calls
-# build/android/pylib/findbugs.py to analyze the classes in
+# build/android/pylib/utils/findbugs.py to analyze the classes in
# org.chromium.tools.findbugs.plugin package, and expects to get the same
# issue with those in expected_result.txt.
#
@@ -18,25 +18,21 @@ import optparse
import os
import sys
-lib_folder = os.path.join(os.getenv('CHROME_SRC'), 'build', 'android', 'pylib')
-if lib_folder not in sys.path:
- sys.path.append(lib_folder)
+sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__),
+ '..', '..', '..', '..',
+ 'build', 'android')))
-import findbugs
+from pylib import constants
+from pylib.utils import findbugs
def main(argv):
- if not findbugs.CheckEnvironment():
- return 1
-
parser = findbugs.GetCommonParser()
options, _ = parser.parse_args()
- chrome_src = os.getenv('CHROME_SRC')
-
if not options.known_bugs:
- options.known_bugs = os.path.join(chrome_src, 'tools', 'android',
+ options.known_bugs = os.path.join(constants.CHROME_DIR, 'tools', 'android',
'findbugs_plugin', 'test',
'expected_result.txt')
if not options.only_analyze: