[llvm-bugs] [Bug 40660] New: Another Python3 unicode encode error fix

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Feb 8 06:16:49 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40660

            Bug ID: 40660
           Summary: Another Python3 unicode encode error fix
           Product: Test Suite
           Version: 8.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: lit
          Assignee: unassignedbugs at nondot.org
          Reporter: hpj at urpla.net
                CC: daniel at zuster.org, llvm-bugs at lists.llvm.org

Created attachment 21453
  --> https://bugs.llvm.org/attachment.cgi?id=21453&action=edit
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.

-- 
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/20190208/7d3c68de/attachment.html>


More information about the llvm-bugs mailing list