forked from OSchip/llvm-project
[sanitizer] Upgrade android scripts to python 3
This commit is contained in:
parent
40ce58d0ca
commit
94210b12d1
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue