diff --git a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_common.py b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_common.py index da6e6b9d2fd43e020e8d3946a0a84f236090d0be..e38f7a48518999989e5115b93b71ad3c87068f58 100644 --- a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_common.py +++ b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_common.py @@ -1,15 +1,15 @@ import os, subprocess, tempfile -HOS_TMPDIR = '/data/local/tmp/Output' +OHOS_TMPDIR = '/data/local/tmp/Output' ADB = os.environ.get('ADB', 'adb') verbose = False -if os.environ.get('HOS_RUN_VERBOSE') == '1': +if os.environ.get('OHOS_RUN_VERBOSE') == '1': verbose = True def host_to_device_path(path): rel = os.path.relpath(path, "/") - dev = os.path.join(HOS_TMPDIR, rel) + dev = os.path.join(OHOS_TMPDIR, rel) return dev def adb(args, attempts = 1): diff --git a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_compile.py b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_compile.py index 1c8624fbd62113c48b7b1a1c616157aafb1ff926..bc5cd811ebb2116b87a20e6d3d9e566a49e74b6f 100644 --- a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_compile.py +++ b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_compile.py @@ -5,7 +5,7 @@ from ohos_common import * here = os.path.abspath(os.path.dirname(sys.argv[0])) -hos_run = os.path.join(here, 'hos_run.py') +ohos_run = os.path.join(here, 'ohos_run.py') output = None output_type = 'executable' @@ -27,14 +27,14 @@ while args: check_trgt = False if arg.endswith('-linux-ohos'): arg = arg.split('=')[-1] - dyld = 'unknown_hos_dyld' + dyld = 'unknown_ohos_dyld' # FIXME: Handle -mfloat-abi=hard for arm # TODO: Support x86_64 if arg.startswith('arm'): dyld = 'ld-musl-arm.so.1' elif arg.startswith('aarch64'): dyld = 'ld-musl-aarch64.so.1' - append_args += ['-Wl,--dynamic-linker=' + os.path.join(HOS_TMPDIR, dyld)] + append_args += ['-Wl,--dynamic-linker=' + os.path.join(OHOS_TMPDIR, dyld)] if output == None: print "No output file name!" @@ -49,4 +49,4 @@ if output_type in ['executable', 'shared']: if output_type == 'executable': os.rename(output, output + '.real') - os.symlink(hos_run, output) + os.symlink(ohos_run, output) diff --git a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_run.py b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_run.py index 84a8d9fb709cac3831c0fd229db812107b82f173..b5605e615dc33674327a9c88e229f539c8045723 100644 --- a/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_run.py +++ b/compiler-rt/test/sanitizer_common/ohos_family_commands/ohos_run.py @@ -9,7 +9,7 @@ device_binary = host_to_device_path(sys.argv[0]) def build_env(): args = [] # HOS linker ignores RPATH. Set LD_LIBRARY_PATH to Output dir. - args.append('LD_LIBRARY_PATH=%s' % (HOS_TMPDIR,)) + args.append('LD_LIBRARY_PATH=%s' % (OHOS_TMPDIR,)) for (key, value) in os.environ.items(): if key in ['ASAN_ACTIVATION_OPTIONS', 'SCUDO_OPTIONS'] or key.endswith('SAN_OPTIONS'): args.append('%s="%s"' % (key, value)) @@ -23,7 +23,7 @@ device_exitcode = device_binary + '.exitcode' device_linker = '' ret = adb(['shell', 'cd %s && %s %s %s %s >%s 2>%s ; echo $? >%s' % - (HOS_TMPDIR, device_env, device_linker, device_binary, device_args, + (OHOS_TMPDIR, device_env, device_linker, device_binary, device_args, device_stdout, device_stderr, device_exitcode)]) if ret != 0: sys.exit(ret)