[llvm-bugs] [Bug 48934] New: Runtime unit-tests doesn't work with Python 3
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jan 28 23:47:18 PST 2021
https://bugs.llvm.org/show_bug.cgi?id=48934
Bug ID: 48934
Summary: Runtime unit-tests doesn't work with Python 3
Product: OpenMP
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: release blocker
Priority: P
Component: Runtime Library
Assignee: unassignedbugs at nondot.org
Reporter: tobias at plexapp.com
CC: llvm-bugs at lists.llvm.org
The following test fails on my python3 only system:
```
llvm-lit:
/Users/tobias/code/llvm-releases/12.0.0/rc1/llvm-project/llvm/utils/lit/lit/TestingConfig.py:99:
fatal: unable to parse config file
'/Users/tobias/code/llvm-releases/12.0.0/rc1/llvm-project/openmp/runtime/test/lit.cfg',
traceback: Traceback (most recent call last):
File
"/Users/tobias/code/llvm-releases/12.0.0/rc1/Phase3/Release/llvmCore-12.0.0-rc1.obj/bin/../../../../llvm-project/llvm/utils/lit/lit/TestingConfig.py",
line 88, in load_from_path
exec(compile(data, path, 'exec'), cfg_globals, None)
File
"/Users/tobias/code/llvm-releases/12.0.0/rc1/llvm-project/openmp/runtime/test/lit.cfg",
line 82, in <module>
config.test_flags += " -isysroot " + out
TypeError: can only concatenate str (not "bytes") to str
```
The following patch fixes it:
```
diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index 357b18a205d0..96c0c3a1da70 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -76,7 +76,7 @@ if config.operating_system == 'Darwin':
cmd = subprocess.Popen(['xcrun', '--show-sdk-path'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = cmd.communicate()
- out = out.strip()
+ out = out.strip().decode()
res = cmd.wait()
if res == 0 and out:
config.test_flags += " -isysroot " + out
```
This blocks testing of 12.0.0 on macOS
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210129/54b81737/attachment.html>
More information about the llvm-bugs
mailing list