diff options
author | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2018-08-06 21:38:52 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2018-08-06 21:38:52 +0200 |
commit | 36a4c19494e2cb7e968f1d0e0c09926a660e1a56 (patch) | |
tree | df0f11449f983fb00c65b816046fb3092d19ef32 /testsuite/config | |
parent | 29dfb63624442a27119c1a218fc3dae71afb16de (diff) | |
download | haskell-36a4c19494e2cb7e968f1d0e0c09926a660e1a56.tar.gz |
Testsuite driver: fix encoding issue when calling ghc-pkg
Summary:
In Python 3, subprocess.communicate() returns a pair of bytes, which
need to be decoded. In runtests.py, we were just calling str() instead,
which converts b'x' to "b'x'". As a result, the loop that was checking
pkginfo for lines starting with 'library-dirs' couldn't work.
Reviewers: bgamari, thomie, Phyx
Reviewed By: thomie
Subscribers: Phyx, rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5046
Diffstat (limited to 'testsuite/config')
-rw-r--r-- | testsuite/config/ghc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc index a850be90d4..6777a59473 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -158,10 +158,10 @@ llvm_ways = [x[0] for x in config.way_flags.items() if '-fflvm' in x[1]] def get_compiler_info(): - s = getStdout([config.compiler, '--info']).decode('utf8') + s = getStdout([config.compiler, '--info']) s = re.sub('[\r\n]', '', s) compilerInfoDict = dict(eval(s)) - s = getStdout([config.compiler, '+RTS', '--info']).decode('utf8') + s = getStdout([config.compiler, '+RTS', '--info']) s = re.sub('[\r\n]', '', s) rtsInfoDict = dict(eval(s)) |