[lldb] Fix Python 3 incompatibility in API/lit.cfg.py

This code path is only taken on the sanitized bot, where it caused a
TypeError: "Can't mix strings and bytes in path components".
This commit is contained in:
Jonas Devlieghere 2019-11-05 10:12:05 -08:00
parent 15140e4bac
commit a9970036d4
1 changed files with 4 additions and 3 deletions

View File

@ -27,7 +27,8 @@ if 'Address' in config.llvm_use_sanitizer:
if 'Darwin' in config.host_os and 'x86' in config.host_triple:
import subprocess
resource_dir = subprocess.check_output(
[config.cmake_cxx_compiler, '-print-resource-dir']).strip()
[config.cmake_cxx_compiler,
'-print-resource-dir']).decode('utf-8').strip()
runtime = os.path.join(resource_dir, 'lib', 'darwin',
'libclang_rt.asan_osx_dynamic.dylib')
config.environment['DYLD_INSERT_LIBRARIES'] = runtime
@ -66,9 +67,9 @@ for cachedir in [config.clang_module_cache, config.lldb_module_cache]:
# lit complains if the value is set but it is not supported.
supported, errormsg = lit_config.maxIndividualTestTimeIsSupported
if supported:
lit_config.maxIndividualTestTime = 600
lit_config.maxIndividualTestTime = 600
else:
lit_config.warning("Could not set a default per-test timeout. " + errormsg)
lit_config.warning("Could not set a default per-test timeout. " + errormsg)
# Build dotest command.
dotest_cmd = [config.dotest_path]