diff options
author | Nicolas Schneider <nioncode+git@gmail.com> | 2016-02-22 22:04:34 +0100 |
---|---|---|
committer | Nicolas Schneider <nioncode+git@gmail.com> | 2016-02-22 22:58:17 +0100 |
commit | 681a14a695bb85efe2550b824270a3da8856d5d0 (patch) | |
tree | d42e2fd2e60397f67b5aea8c587196b20a3717aa /run_tests.py | |
parent | d88223bd615ebce49cc662a3b48461de9c4780bc (diff) | |
download | meson-681a14a695bb85efe2550b824270a3da8856d5d0.zip meson-681a14a695bb85efe2550b824270a3da8856d5d0.tar.gz meson-681a14a695bb85efe2550b824270a3da8856d5d0.tar.bz2 |
use sys.stdout.encoding when parsing subprocess output
Diffstat (limited to 'run_tests.py')
-rwxr-xr-x | run_tests.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/run_tests.py b/run_tests.py index 2211949..d4c6ff2 100755 --- a/run_tests.py +++ b/run_tests.py @@ -207,8 +207,8 @@ def run_test(testdir, extra_args, should_succeed): stdout=subprocess.PIPE, stderr=subprocess.PIPE) (o, e) = pc.communicate() build_time = time.time() - build_start - stdo += o.decode('utf-8') - stde += e.decode('utf-8') + stdo += o.decode(sys.stdout.encoding) + stde += e.decode(sys.stdout.encoding) if pc.returncode != 0: return TestResult('Compiling source code failed.', stdo, stde, gen_time, build_time) test_start = time.time() @@ -230,8 +230,8 @@ def run_test(testdir, extra_args, should_succeed): pi = subprocess.Popen(install_commands, cwd=test_build_dir, env=env, stdout=subprocess.PIPE, stderr=subprocess.PIPE) (o, e) = pi.communicate() - stdo += o.decode('utf-8') - stde += e.decode('utf-8') + stdo += o.decode(sys.stdout.encoding) + stde += e.decode(sys.stdout.encoding) if pi.returncode != 0: return TestResult('Running install failed.', stdo, stde, gen_time, build_time, test_time) return TestResult(validate_install(testdir, install_dir), stdo, stde, gen_time, build_time, test_time) |