Commit 48142096 authored by Ned Nguyen's avatar Ned Nguyen Committed by Commit Bot

[testing/test_env.py] Use utf-8 encoding for reading test log

Bug: 891747
Change-Id: I73142c8bb5c4bbc78da71f230188e33d548a3dab
Reviewed-on: https://chromium-review.googlesource.com/c/1259475
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarJohn Budorick <jbudorick@chromium.org>
Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Cr-Commit-Position: refs/heads/master@{#596397}
parent dca7db9e
......@@ -178,8 +178,8 @@ def run_command_with_output(argv, stdoutfile, env=None, cwd=None):
"""
print('Running %r in %r (env: %r)' % (argv, cwd, env))
assert stdoutfile
with io.open(stdoutfile, 'w') as writer, io.open(stdoutfile, 'r', 1) as \
reader:
with io.open(stdoutfile, 'w', encoding='utf-8') as writer, \
io.open(stdoutfile, 'r', 1, encoding='utf-8') as reader:
process = subprocess.Popen(argv, env=env, cwd=cwd, stdout=writer,
stderr=subprocess.STDOUT)
forward_signals([process])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment