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

Unified Diff: build/android/pylib/android_commands.py

Issue 23494039: [android] Relands: Adds constants.GetBuildDirectory() and converts test scripts to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix provision_devices.py which never set the build type 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 | « build/android/provision_devices.py ('k') | build/android/pylib/base/base_test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/android_commands.py
diff --git a/build/android/pylib/android_commands.py b/build/android/pylib/android_commands.py
index 4228b035f134187443d9fff1d89363d635677b33..66f7bcf633f682be441fdd7dc79fd06818f266d1 100644
--- a/build/android/pylib/android_commands.py
+++ b/build/android/pylib/android_commands.py
@@ -247,7 +247,6 @@ class AndroidCommands(object):
self._device_utc_offset = None
self._potential_push_size = 0
self._actual_push_size = 0
- self._md5sum_build_dir = ''
self._external_storage = ''
self._util_wrapper = ''
@@ -783,18 +782,11 @@ class AndroidCommands(object):
A tuple containing lists of the host and device md5sum results as
created by _ParseMd5SumOutput().
"""
- if not self._md5sum_build_dir:
- default_build_type = os.environ.get('BUILD_TYPE', 'Debug')
- build_dir = '%s/%s/' % (
- cmd_helper.OutDirectory().get(), default_build_type)
- md5sum_dist_path = '%s/md5sum_dist' % build_dir
- if not os.path.exists(md5sum_dist_path):
- build_dir = '%s/Release/' % cmd_helper.OutDirectory().get()
- md5sum_dist_path = '%s/md5sum_dist' % build_dir
- assert os.path.exists(md5sum_dist_path), 'Please build md5sum.'
- command = 'push %s %s' % (md5sum_dist_path, MD5SUM_DEVICE_FOLDER)
- assert _HasAdbPushSucceeded(self._adb.SendCommand(command))
- self._md5sum_build_dir = build_dir
+ md5sum_dist_path = os.path.join(constants.GetOutDirectory(),
+ 'md5sum_dist')
+ assert os.path.exists(md5sum_dist_path), 'Please build md5sum.'
+ command = 'push %s %s' % (md5sum_dist_path, MD5SUM_DEVICE_FOLDER)
+ assert _HasAdbPushSucceeded(self._adb.SendCommand(command))
cmd = (MD5SUM_LD_LIBRARY_PATH + ' ' + self._util_wrapper + ' ' +
MD5SUM_DEVICE_PATH + ' ' + device_path)
@@ -802,7 +794,8 @@ class AndroidCommands(object):
self.RunShellCommand(cmd, timeout_time=2 * 60))
assert os.path.exists(host_path), 'Local path not found %s' % host_path
md5sum_output = cmd_helper.GetCmdOutput(
- ['%s/md5sum_bin_host' % self._md5sum_build_dir, host_path])
+ [os.path.join(constants.GetOutDirectory(), 'md5sum_bin_host'),
+ host_path])
host_hash_tuples = _ParseMd5SumOutput(md5sum_output.splitlines())
return (host_hash_tuples, device_hash_tuples)
« no previous file with comments | « build/android/provision_devices.py ('k') | build/android/pylib/base/base_test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698