<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Runtime unit-tests doesn't work with Python 3"
   href="https://bugs.llvm.org/show_bug.cgi?id=48934">48934</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Runtime unit-tests doesn't work with Python 3
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>OpenMP
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>release blocker
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Runtime Library
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>tobias@plexapp.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>