[PATCH] D33468: Enable unicode output on terminals.

Axel Naumann via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 21 02:56:14 PDT 2017


karies added a comment.

Apologies for the slow response.

This is about a test file using a unicode (or non-ASCII?) character, for instance ächo.C. If you put this into a lit test suite and run lit without this patch it will complain:

  Exception in thread Thread-3:                                                                                                                                                                                                                
  Traceback (most recent call last):
    File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
      self.run()
    File "/usr/lib/python2.7/threading.py", line 754, in run
      self.__target(*self.__args, **self.__kwargs)
    File "/usr/lib/python2.7/multiprocessing/pool.py", line 405, in _handle_results
      cache[job]._set(i, obj)
    File "/usr/lib/python2.7/multiprocessing/pool.py", line 572, in _set
      self._callback(self._value)
    File "/mnt/a/build/cling/cling-all-in-one/cling-all-in-one/src/utils/lit/lit/run.py", line 443, in consume_test_result
      self.display.update(test_with_result)
    File "/mnt/a/build/cling/cling-all-in-one/cling-all-in-one/src/utils/lit/lit/main.py", line 50, in update
      test.getFullName())
    File "/mnt/a/build/cling/cling-all-in-one/cling-all-in-one/src/utils/lit/lit/ProgressBar.py", line 271, in update
      self.term.CLEAR_EOL + message)
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)

This patch prevents that exception. (Which btw brings lit into a terrible state...)


Repository:
  rL LLVM

https://reviews.llvm.org/D33468





More information about the llvm-commits mailing list