[compiler-rt] 94210b1 - [sanitizer] Upgrade android scripts to python 3
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 13 20:45:56 PDT 2021
Author: Vitaly Buka
Date: 2021-07-13T20:45:49-07:00
New Revision: 94210b12d1d6454c6de8ca4c83a82a1148b5cd1a
URL: https://github.com/llvm/llvm-project/commit/94210b12d1d6454c6de8ca4c83a82a1148b5cd1a
DIFF: https://github.com/llvm/llvm-project/commit/94210b12d1d6454c6de8ca4c83a82a1148b5cd1a.diff
LOG: [sanitizer] Upgrade android scripts to python 3
Added:
Modified:
compiler-rt/test/sanitizer_common/android_commands/android_common.py
compiler-rt/test/sanitizer_common/android_commands/android_run.py
Removed:
################################################################################
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 eb15c34ed52f..81caae8741c2 100644
--- a/compiler-rt/test/sanitizer_common/android_commands/android_common.py
+++ b/compiler-rt/test/sanitizer_common/android_commands/android_common.py
@@ -15,7 +15,7 @@ def host_to_device_path(path):
def adb(args, attempts = 1, timeout_sec = 600):
if verbose:
- print args
+ print(args)
tmpname = tempfile.mktemp()
out = open(tmpname, 'w')
ret = 255
@@ -23,11 +23,11 @@ def adb(args, attempts = 1, timeout_sec = 600):
attempts -= 1
ret = subprocess.call(['timeout', str(timeout_sec), ADB] + args, stdout=out, stderr=subprocess.STDOUT)
if ret != 0:
- print "adb command failed", args
- print tmpname
+ print("adb command failed", args)
+ print(tmpname)
out.close()
out = open(tmpname, 'r')
- print out.read()
+ print(out.read())
out.close()
os.unlink(tmpname)
return ret
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 8f2e40152de7..e09e502b0b73 100755
--- a/compiler-rt/test/sanitizer_common/android_commands/android_run.py
+++ b/compiler-rt/test/sanitizer_common/android_commands/android_run.py
@@ -11,7 +11,7 @@ def build_env():
args = []
# Android linker ignores RPATH. Set LD_LIBRARY_PATH to Output dir.
args.append('LD_LIBRARY_PATH=%s' % (ANDROID_TMPDIR,))
- for (key, value) in os.environ.items():
+ for (key, value) in list(os.environ.items()):
if key in ['ASAN_ACTIVATION_OPTIONS', 'SCUDO_OPTIONS'] or key.endswith('SAN_OPTIONS'):
args.append('%s="%s"' % (key, value.replace('"', '\\"')))
return ' '.join(args)
More information about the llvm-commits
mailing list