summaryrefslogtreecommitdiffstats
path: root/build/android/pylib/__init__.py
diff options
context:
space:
mode:
authorbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-05 21:16:21 +0000
committerbulach@chromium.org <bulach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-05 21:16:21 +0000
commit6f8fd9ec704392a3f2d2c0bf82d75cc47b15b9bd (patch)
treec50ec078f4cf413e710462de5c6281d2b9882dc8 /build/android/pylib/__init__.py
parentb5cb4e77ea48612174323b2d813931c0f8a3cc42 (diff)
downloadchromium_src-6f8fd9ec704392a3f2d2c0bf82d75cc47b15b9bd.zip
chromium_src-6f8fd9ec704392a3f2d2c0bf82d75cc47b15b9bd.tar.gz
chromium_src-6f8fd9ec704392a3f2d2c0bf82d75cc47b15b9bd.tar.bz2
Android: allows using adb from a chromium checkout without envsetup.sh
Following comments on https://chromiumcodereview.appspot.com/15891002, rather than setting the path in pylib.__init__, set it via constants and android_commands.py. Note that android_commands calls into third_party/android_testrunner, which then uses adb directly, so it still needs to tweak os.environ.path. BUG=242960 TEST=./build/android/run_tests.py -s cc_perftests Review URL: https://chromiumcodereview.appspot.com/16360003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@204341 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/android/pylib/__init__.py')
-rw-r--r--build/android/pylib/__init__.py18
1 files changed, 0 insertions, 18 deletions
diff --git a/build/android/pylib/__init__.py b/build/android/pylib/__init__.py
index c68adcc..96196cf 100644
--- a/build/android/pylib/__init__.py
+++ b/build/android/pylib/__init__.py
@@ -1,21 +1,3 @@
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-
-import os
-import subprocess
-import sys
-
-
-if sys.platform == 'linux2' and not os.environ.get('ANDROID_SDK_ROOT'):
- # If envsetup.sh hasn't been sourced and there's no adb in the path,
- # set it here.
- try:
- with file(os.devnull, 'w') as devnull:
- subprocess.call(['adb', 'version'], stdout=devnull, stderr=devnull)
- except OSError:
- print 'No adb found in $PATH, fallback to checked in binary.'
- os.environ['PATH'] += os.pathsep + os.path.abspath(os.path.join(
- os.path.dirname(__file__),
- '..', '..', '..',
- 'third_party', 'android_tools', 'sdk', 'platform-tools'))