diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-10-05 20:00:19 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2017-10-05 20:00:19 +0000 |
| commit | 4a3e502d5dc8b43f14b8bbf944864812e4efffae (patch) | |
| tree | 8799fe67a5dae6bfd84ec8029360e1f30151cbf7 | |
| parent | 3b87cc910e934fc3d610b523b71d09c3f69ad5f0 (diff) | |
| download | bcm5719-llvm-4a3e502d5dc8b43f14b8bbf944864812e4efffae.tar.gz bcm5719-llvm-4a3e502d5dc8b43f14b8bbf944864812e4efffae.zip | |
[asan] Use full binary path in the Android test runner.
Summary:
This prevents the confusion when there are similarly named tests in
different configurations (like in test/sanitizer_common).
Reviewers: vitalybuka
Subscribers: srhines, llvm-commits, kubamracek
Differential Revision: https://reviews.llvm.org/D38526
llvm-svn: 315011
| -rw-r--r-- | compiler-rt/test/sanitizer_common/android_commands/android_common.py | 9 | ||||
| -rwxr-xr-x | compiler-rt/test/sanitizer_common/android_commands/android_run.py | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/compiler-rt/test/sanitizer_common/android_commands/android_common.py b/compiler-rt/test/sanitizer_common/android_commands/android_common.py index 41994bb87a1..fc26ee25835 100644 --- a/compiler-rt/test/sanitizer_common/android_commands/android_common.py +++ b/compiler-rt/test/sanitizer_common/android_commands/android_common.py @@ -1,4 +1,4 @@ -import os, subprocess, tempfile +import os, sys, subprocess, tempfile import time ANDROID_TMPDIR = '/data/local/tmp/Output' @@ -8,6 +8,11 @@ verbose = False if os.environ.get('ANDROID_RUN_VERBOSE') == '1': verbose = True +def host_to_device_path(path): + rel = os.path.relpath(path, "/") + dev = os.path.join(ANDROID_TMPDIR, rel) + return dev + def adb(args, attempts = 1): if verbose: print args @@ -37,5 +42,5 @@ def pull_from_device(path): return text def push_to_device(path): - dst_path = os.path.join(ANDROID_TMPDIR, os.path.basename(path)) + dst_path = host_to_device_path(path) adb(['push', path, dst_path], 5) diff --git a/compiler-rt/test/sanitizer_common/android_commands/android_run.py b/compiler-rt/test/sanitizer_common/android_commands/android_run.py index a7f45b9f98d..faa05e24872 100755 --- a/compiler-rt/test/sanitizer_common/android_commands/android_run.py +++ b/compiler-rt/test/sanitizer_common/android_commands/android_run.py @@ -5,8 +5,7 @@ from android_common import * ANDROID_TMPDIR = '/data/local/tmp/Output' -here = os.path.abspath(os.path.dirname(sys.argv[0])) -device_binary = os.path.join(ANDROID_TMPDIR, os.path.basename(sys.argv[0])) +device_binary = host_to_device_path(sys.argv[0]) def build_env(): args = [] |

