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)