Testsuite driver: fix encoding issue when calling ghc-pkg
authorKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Mon, 6 Aug 2018 19:38:52 +0000 (21:38 +0200)
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>
Mon, 6 Aug 2018 19:38:52 +0000 (21:38 +0200)
commit36a4c19494e2cb7e968f1d0e0c09926a660e1a56
treedf0f11449f983fb00c65b816046fb3092d19ef32
parent29dfb63624442a27119c1a218fc3dae71afb16de
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
testsuite/config/ghc
testsuite/driver/runtests.py
testsuite/driver/testutil.py