summaryrefslogtreecommitdiffstats
path: root/llvm/utils/lit/tests
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2017-07-29 02:52:56 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2017-07-29 02:52:56 +0000
commit15b5c8b2069a025566f13c4a81339c6f687ee312 (patch)
tree3ecf0376a1faf7ed187071855bf006465f5aaa89 /llvm/utils/lit/tests
parent9608a2891d51b2e08fa6a0c36931e4be423ad6f1 (diff)
downloadbcm5719-llvm-15b5c8b2069a025566f13c4a81339c6f687ee312.tar.gz
bcm5719-llvm-15b5c8b2069a025566f13c4a81339c6f687ee312.zip
lit::shtest-format.py: Make write-bad-encoding.py py3-aware.
Traceback (most recent call last): File "llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py", line 5, in <module> sys.stdout.write(b"a line with bad encoding: \xc2.") sys.stdout.write doesn't accept bytes but sys.stdout.buffer.write accepts. llvm-svn: 309473
Diffstat (limited to 'llvm/utils/lit/tests')
-rw-r--r--llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py
index 32ff2d81805..a5a2bc9da8a 100644
--- a/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py
+++ b/llvm/utils/lit/tests/Inputs/shtest-format/external_shell/write-bad-encoding.py
@@ -2,5 +2,5 @@
import sys
-sys.stdout.write(b"a line with bad encoding: \xc2.")
+getattr(sys.stdout, "buffer", sys.stdout).write(b"a line with bad encoding: \xc2.")
sys.stdout.flush()
OpenPOWER on IntegriCloud