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)
committerBen Gamari <ben@smart-cactus.org>
Mon, 6 Aug 2018 22:32:45 +0000 (18:32 -0400)
commit2bbff4dccc05a82492458c113ba24b8cd6caf41d
treea00631babe41320beab270d35107796b71470324
parent8edc4b4bac47d971b72b8ce62f847352cfe318e3
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

(cherry picked from commit 36a4c19494e2cb7e968f1d0e0c09926a660e1a56)
testsuite/config/ghc
testsuite/driver/runtests.py
testsuite/driver/testutil.py