Commit 2dca4da2 authored by raphael.kubo.da.costa's avatar raphael.kubo.da.costa Committed by Commit bot

[Android] Do not overwrite command when using the run_pie wrapper.

Some change starting in M41 has started causing an existing bug in
GetAndroidToolsStatusAndOutput() to fail in ICS devices. When the
run_pie wrapper needs to be used, the call to `adb push' ends up
overwriting the original command that was going to be run on the device,
and the instrumentation tests fail like this:

> LD_LIBRARY_PATH=/data/local/tmp/forwarder/ /data/local/tmp/run_pie push /path/in/host/out/Release/run_pie /data/local/tmp/run_pie; echo %$?
[...]
[PIE Loader] dlopen() failed: Cannot load library: load_library[1095]: Library 'push' not found.

Fix it by using a different variable name for the `adb push' command
that must be run on the host.

BUG=373219
R=primiano@chromium.org, torne@chromium.org

Review URL: https://codereview.chromium.org/926023002

Cr-Commit-Position: refs/heads/master@{#316233}
parent ba859048
...@@ -694,8 +694,8 @@ class AndroidCommands(object): ...@@ -694,8 +694,8 @@ class AndroidCommands(object):
assert os.path.exists(run_pie_dist_path), 'Please build run_pie' assert os.path.exists(run_pie_dist_path), 'Please build run_pie'
# The PIE loader must be pushed manually (i.e. no PushIfNeeded) because # The PIE loader must be pushed manually (i.e. no PushIfNeeded) because
# PushIfNeeded requires md5sum and md5sum requires the wrapper as well. # PushIfNeeded requires md5sum and md5sum requires the wrapper as well.
command = 'push %s %s' % (run_pie_dist_path, PIE_WRAPPER_PATH) adb_command = 'push %s %s' % (run_pie_dist_path, PIE_WRAPPER_PATH)
assert _HasAdbPushSucceeded(self._adb.SendCommand(command)) assert _HasAdbPushSucceeded(self._adb.SendCommand(adb_command))
self._pie_wrapper = PIE_WRAPPER_PATH self._pie_wrapper = PIE_WRAPPER_PATH
if self._pie_wrapper: if self._pie_wrapper:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment