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

Unified Diff: trunk/src/tools/telemetry/telemetry/core/backends/adb_commands.py

Issue 23926012: Revert 221736 "[android] Adds constants.GetOutDirectory() and co..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 | « trunk/src/chrome/test/functional/ispy/ispy_core/tools/reverse_port_forwarder.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/tools/telemetry/telemetry/core/backends/adb_commands.py
===================================================================
--- trunk/src/tools/telemetry/telemetry/core/backends/adb_commands.py (revision 222006)
+++ trunk/src/tools/telemetry/telemetry/core/backends/adb_commands.py (working copy)
@@ -14,7 +14,7 @@
util.AddDirToPythonPath(util.GetChromiumSrcDir(), 'build', 'android')
try:
from pylib import android_commands # pylint: disable=F0401
- from pylib import constants # pylint: disable=F0401
+ from pylib import cmd_helper # pylint: disable=F0401
from pylib import forwarder # pylint: disable=F0401
from pylib import ports # pylint: disable=F0401
except Exception:
@@ -41,6 +41,10 @@
return ports.ResetTestServerPortAllocation()
+def GetOutDirectory():
+ return cmd_helper.OutDirectory.get()
+
+
class AdbCommands(object):
"""A thin wrapper around ADB"""
@@ -147,11 +151,10 @@
if not buildtype:
return (HasForwarder(buildtype='Release') or
HasForwarder(buildtype='Debug'))
- device_forwarder = os.path.join(
- constants.GetOutDirectory(build_type=buildtype), 'device_forwarder')
- host_forwarder = os.path.join(
- constants.GetOutDirectory(build_type=buildtype), 'host_forwarder')
- return os.path.exists(device_forwarder) and os.path.exists(host_forwarder)
+ return (os.path.exists(os.path.join(GetOutDirectory(), buildtype,
+ 'device_forwarder')) and
+ os.path.exists(os.path.join(GetOutDirectory(), buildtype,
+ 'host_forwarder')))
class Forwarder(object):
def __init__(self, adb, *port_pairs):
@@ -162,12 +165,6 @@
for port_pair in port_pairs]
self._port_pairs = new_port_pairs
- if HasForwarder('Release'):
- constants.SetBuildType('Release')
- elif HasForwarder('Debug'):
- constants.SetBuildType('Debug')
- else:
- raise Exception('Build forwarder2')
forwarder.Forwarder.Map(new_port_pairs, self._adb)
@property
« no previous file with comments | « trunk/src/chrome/test/functional/ispy/ispy_core/tools/reverse_port_forwarder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698