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

Unified Diff: tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.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/utils/findbugs.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/findbugs_plugin/test/run_findbugs_plugin_tests.py
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 1115192fb44a78a7c451caebabb4f476d0b9f02a..f660f1f6221ce70ced1f3ee73c47ad482a63cf9a 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:
« no previous file with comments | « build/android/pylib/utils/findbugs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698