<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 - Another Python3 unicode encode error fix"
   href="https://bugs.llvm.org/show_bug.cgi?id=40660">40660</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Another Python3 unicode encode error fix
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Test Suite
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>8.0
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>lit
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>hpj@urpla.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>daniel@zuster.org, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21453" name="attach_21453" title="Fix Python3 unicode encode error">attachment 21453</a> <a href="attachment.cgi?id=21453&action=edit" title="Fix Python3 unicode encode error">[details]</a></span>
Fix Python3 unicode encode error

Hi, 

I'm building llvm for a couple of openSUSE environments, that sports a pretty
current Python environment as well. In order to build and test the build
correctly, I carry the attached patch around. I'm sorry to not provide an
isolated test case around, my test cases are the llvm{6,7} builds ;-)

I'm not sure, if the attached patch is acceptable as such, but it fixes
reproducible issues here:

```
[ 6876s] [332/333] cd /home/abuild/rpmbuild/BUILD/llvm-7.0.1.src/build/test &&
/usr/bin/python3
/home/abuild/rpmbuild/BUILD/llvm-7.0.1.src/build/./bin/llvm-lit -sv
/home/abuild/rpmbuild/BUILD/llvm-7.0.1.src/build/test
[ 6878s] -- Testing: 27008 tests, 8 threads --
[ 7119s] Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.
[ 7119s] UNRESOLVED: LLVM :: Other/lit-unicode.txt (21006 of 27008)
[ 7119s] ******************** TEST 'LLVM :: Other/lit-unicode.txt' FAILED
********************
[ 7119s] Exception during script execution:
[ 7119s] Traceback (most recent call last):
[ 7119s]   File
"/home/abuild/rpmbuild/BUILD/llvm-7.0.1.src/utils/lit/lit/run.py", line 202, in
_execute_test_impl
[ 7119s]     result = test.config.test_format.execute(test, lit_config)
[ 7119s]   File
"/home/abuild/rpmbuild/BUILD/llvm-7.0.1.src/utils/lit/lit/formats/shtest.py",
line 25, in execute
[ 7119s]     self.execute_external)
[ 7119s]   File
"/home/abuild/rpmbuild/BUILD/llvm-7.0.1.src/utils/lit/lit/TestRunner.py", line
1576, in executeShTest
[ 7119s]     res = _runShTest(test, litConfig, useExternalSh, script, tmpBase)
[ 7119s]   File
"/home/abuild/rpmbuild/BUILD/llvm-7.0.1.src/utils/lit/lit/TestRunner.py", line
1522, in _runShTest
[ 7119s]     res = executeScript(test, litConfig, tmpBase, script, execdir)
[ 7119s]   File
"/home/abuild/rpmbuild/BUILD/llvm-7.0.1.src/utils/lit/lit/TestRunner.py", line
1102, in executeScript
[ 7119s]     f.write('{ ' + '; } &&\n{ '.join(commands) + '; }')
[ 7119s] UnicodeEncodeError: 'ascii' codec can't encode characters in position
30-33: ordinal not in range(128)
[ 7119s] 
[ 7119s] 
[ 7119s] ********************
[ 7181s] Testing: 0 .. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
[ 7181s] Testing Time: 302.57s
[ 7181s] ********************
[ 7181s] Unresolved Tests (1):
[ 7181s]     LLVM :: Other/lit-unicode.txt
[ 7181s] 
[ 7181s]   Expected Passes    : 25707
[ 7181s]   Expected Failures  : 143
[ 7181s]   Unsupported Tests  : 1157
[ 7181s]   Unresolved Tests   : 1
[ 7182s] FAILED: test/CMakeFiles/check-llvm 

This patch fixes this.</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>