[Lldb-commits] [lldb] a997003 - [lldb] Fix Python 3 incompatibility in API/lit.cfg.py

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Nov 5 10:13:09 PST 2019


Author: Jonas Devlieghere
Date: 2019-11-05T10:13:01-08:00
New Revision: a9970036d43b4fb8622d7179603722b539756457

URL: https://github.com/llvm/llvm-project/commit/a9970036d43b4fb8622d7179603722b539756457
DIFF: https://github.com/llvm/llvm-project/commit/a9970036d43b4fb8622d7179603722b539756457.diff

LOG: [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".

Added: 
    

Modified: 
    lldb/test/API/lit.cfg.py

Removed: 
    


################################################################################
diff  --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index f29d9047e24e..06125a1aaedd 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -27,7 +27,8 @@
   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 @@ def find_shlibpath_var():
 # 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]


        


More information about the lldb-commits mailing list