diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2023-01-11 21:09:34 +0100 |
---|---|---|
committer | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2023-01-11 21:09:34 +0100 |
commit | b1c81f429ae0720b245a71065b3752a7ec181cf8 (patch) | |
tree | 395a43d754ab83b79b9cc33ad4b15f2f77bd0f41 /testsuite/driver/runtests.py | |
parent | 964284fcab6e27fe2fa5c279ea008551cbc15dbb (diff) | |
download | haskell-wip/python-files.tar.gz |
Use -Wdefault when running Python testdriver (#22727)wip/python-files
Diffstat (limited to 'testsuite/driver/runtests.py')
-rw-r--r-- | testsuite/driver/runtests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index e254ff13aa..223d644ee6 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -99,7 +99,8 @@ if args.e: if args.config_file: for arg in args.config_file: - exec(open(arg).read()) + with io.open(arg) as f: + exec(f.read()) if args.config: for arg in args.config: @@ -349,8 +350,6 @@ except Exception as e: print('Failed to detect CPU features: ', e) sys.stdout.flush() -# we output text, which cannot be unbuffered -sys.stdout = os.fdopen(sys.__stdout__.fileno(), "w") if config.local: tempdir = '' @@ -607,6 +606,7 @@ else: print("WARNING - skipping all tests and only reporting required hadrian dependencies:", config.hadrian_deps) for d in config.hadrian_deps: print(d,file=config.only_report_hadrian_deps) + config.only_report_hadrian_deps.close() if len(t.unexpected_failures) > 0 or \ len(t.unexpected_stat_failures) > 0 or \ |