diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-04-22 20:45:02 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-04-22 21:53:22 +0300 |
commit | 166ed4009759e17c04c23fb01a99119defe7847d (patch) | |
tree | 539a28a4cd7c0c38c9c106d6fccfe72a3fe51031 /run_project_tests.py | |
parent | 04952fe220c260399d420334ccc4f64189d72609 (diff) | |
download | meson-166ed4009759e17c04c23fb01a99119defe7847d.zip meson-166ed4009759e17c04c23fb01a99119defe7847d.tar.gz meson-166ed4009759e17c04c23fb01a99119defe7847d.tar.bz2 |
Explicitly open log files in utf-8.
Diffstat (limited to 'run_project_tests.py')
-rwxr-xr-x | run_project_tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/run_project_tests.py b/run_project_tests.py index b44a723..d471460 100755 --- a/run_project_tests.py +++ b/run_project_tests.py @@ -311,7 +311,7 @@ def _run_test(testdir, test_build_dir, install_dir, extra_args, compiler, backen (returncode, stdo, stde) = run_configure(meson_command, gen_args) try: logfile = os.path.join(test_build_dir, 'meson-logs/meson-log.txt') - with open(logfile, errors='ignore') as f: + with open(logfile, encoding='utf-8', errors='ignore') as f: mesonlog = f.read() except Exception: mesonlog = no_meson_log_msg @@ -515,7 +515,7 @@ def detect_tests_to_run(): def run_tests(all_tests, log_name_base, extra_args): global logfile txtname = log_name_base + '.txt' - with open(txtname, 'w', encoding="utf_8") as lf: + with open(txtname, 'w', encoding='utf-8', errors='ignore') as lf: logfile = lf return _run_tests(all_tests, log_name_base, extra_args) |