diff options
author | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2014-10-01 23:41:27 +0200 |
---|---|---|
committer | Krzysztof Gogolewski <krz.gogolewski@gmail.com> | 2014-10-01 23:41:27 +0200 |
commit | 084d241b316bfa12e41fc34cae993ca276bf0730 (patch) | |
tree | 2c51250374dd6419d2c2db2c16e3dff06c7206e9 /testsuite/config | |
parent | 2a8856884de7d476e26b4ffa829ccb3a14d6f63e (diff) | |
download | haskell-084d241b316bfa12e41fc34cae993ca276bf0730.tar.gz |
Basic Python 3 support for testsuite driver (Trac #9184)
Summary:
Most of the changes is adaptation of old Python 2 only code.
My priority was not breaking Python 2, and so I avoided bigger
changes to the driver. In particular, under Python 3 the output
is a str and buffering cannot be disabled.
To test, define PYTHON=python3 in testsuite/mk/boilerplate.mk.
Thanks to aspidites <emarshall85@gmail.com> who provided the initial patch.
Test Plan: validate under 2 and 3
Reviewers: hvr, simonmar, thomie, austin
Reviewed By: thomie, austin
Subscribers: aspidites, thomie, simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D233
GHC Trac Issues: #9184
Diffstat (limited to 'testsuite/config')
-rw-r--r-- | testsuite/config/ghc | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/testsuite/config/ghc b/testsuite/config/ghc index 031d955552..84b89d49bb 100644 --- a/testsuite/config/ghc +++ b/testsuite/config/ghc @@ -148,21 +148,17 @@ config.way_rts_flags = { # Useful classes of ways that can be used with only_ways() and # expect_broken_for(). -prof_ways = map (lambda x: x[0], \ - filter(lambda x: '-prof' in x[1], \ - config.way_flags('dummy_name').items())) +prof_ways = [x[0] for x in config.way_flags('dummy_name').items() + if '-prof' in x[1]] -threaded_ways = map (lambda x: x[0], \ - filter(lambda x: '-threaded' in x[1] or 'ghci' == x[0], \ - config.way_flags('dummy_name').items())) +threaded_ways = [x[0] for x in config.way_flags('dummy_name').items() + if '-threaded' in x[1] or 'ghci' == x[0]] -opt_ways = map (lambda x: x[0], \ - filter(lambda x: '-O' in x[1], \ - config.way_flags('dummy_name').items())) +opt_ways = [x[0] for x in config.way_flags('dummy_name').items() + if '-O' in x[1]] -llvm_ways = map (lambda x: x[0], \ - filter(lambda x: '-fllvm' in x[1], \ - config.way_flags('dummy_name').items())) +llvm_ways = [x[0] for x in config.way_flags('dummy_name').items() + if '-fflvm' in x[1]] def get_compiler_info(): # This should really not go through the shell @@ -192,7 +188,7 @@ def get_compiler_info(): if re.match(".*_p(_.*|$)", rtsInfoDict["RTS way"]): config.compiler_profiled = True - config.run_ways = filter(lambda x: x != 'ghci', config.run_ways) + config.run_ways = [x for x in config.run_ways if x != 'ghci'] else: config.compiler_profiled = False |