1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/utils/lit/tests
Michal Gorny 2e09cdda41 [lit] Fix UnicodeEncodeError when test commands contain non-ASCII chars
Ensure that the bash script written by lit TestRunner is open with UTF-8
encoding when using Python 3.  Otherwise, attempt to write non-ASCII
characters causes UnicodeEncodeError.  This happened e.g. with
the following LLD test:

UNRESOLVED: lld :: ELF/format-binary-non-ascii.s (657 of 2119)
******************** TEST 'lld :: ELF/format-binary-non-ascii.s' FAILED ********************
Exception during script execution:
Traceback (most recent call last):
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/worker.py", line 63, in _execute_test
    result = test.config.test_format.execute(test, lit_config)
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/formats/shtest.py", line 25, in execute
    self.execute_external)
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1644, in executeShTest
    res = _runShTest(test, litConfig, useExternalSh, script, tmpBase)
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1590, in _runShTest
    res = executeScript(test, litConfig, tmpBase, script, execdir)
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1157, in executeScript
    f.write('{ ' + '; } &&\n{ '.join(commands) + '; }')
UnicodeEncodeError: 'ascii' codec can't encode character '\xa3' in position 274: ordinal not in range(128)

Differential Revision: https://reviews.llvm.org/D63254

llvm-svn: 363388
2019-06-14 13:31:48 +00:00
..
Inputs [lit] Fix UnicodeEncodeError when test commands contain non-ASCII chars 2019-06-14 13:31:48 +00:00
unit
.coveragerc
boolean-parsing.py
discovery.py [lit] Remove --single-process option (use -j1 instead) 2019-02-14 22:46:56 +00:00
googletest-format.py
googletest-timeout.py
googletest-upstream-format.py
lit.cfg lit: modernize the lit configuration for the lit tests 2019-05-29 18:07:39 +00:00
lit.site.cfg.in lit: modernize the lit configuration for the lit tests 2019-05-29 18:07:39 +00:00
max-failures.py
parallelism-groups.py [lit] Allow setting parallelism groups to None 2019-02-26 19:03:26 +00:00
progress-bar.py [lit][NFC] Cleanup copy&paste naming mistake 2019-02-15 02:44:52 +00:00
selecting.py
shell-parsing.py
shtest-encoding.py
shtest-format.py [lit] Fix UnicodeEncodeError when test commands contain non-ASCII chars 2019-06-14 13:31:48 +00:00
shtest-output-printing.py [lit][tests][AIX] Update expected form of diagnostic messages; use not to normalize non-zero exit values 2019-05-01 15:47:16 +00:00
shtest-run-at-line.py
shtest-shell.py Add Support for Creating and Deleting Unicode Files and Directories in Lit 2019-02-28 19:16:17 +00:00
shtest-timeout.py lit: modernize the lit configuration for the lit tests 2019-05-29 18:07:39 +00:00
test-data-micro.py
test-data.py
test-output-micro.py
test-output.py
usage.py
xunit-output.py