[Openmp-commits] [PATCH] D95669: Make OpenMP's lit.cfg python 3 compatible

Tobias Hieta via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Thu Jan 28 23:46:57 PST 2021


thieta created this revision.
thieta added a project: OpenMP.
Herald added subscribers: guansong, yaxunl.
thieta requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, sstefan1.

This fails currently like this:

  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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95669

Files:
  openmp/runtime/test/lit.cfg


Index: openmp/runtime/test/lit.cfg
===================================================================
--- openmp/runtime/test/lit.cfg
+++ openmp/runtime/test/lit.cfg
@@ -76,7 +76,7 @@
   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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95669.320059.patch
Type: text/x-patch
Size: 488 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210129/8bfd3a3d/attachment.bin>


More information about the Openmp-commits mailing list