From 6118d9192222217fd3049b62f5ab86a4b7d0656e Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 6 Feb 2025 16:27:29 -0800 Subject: [PATCH] improve unit tests in benchmark --- benchmark/benchmark.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index f8267761a..66b187df5 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -964,9 +964,10 @@ def run_unit_tests(original_dname, testdir, history_fname, test_files): # Copy test files from original directory for file_path in test_files: - src = original_dname / testdir.name / file_path + src = original_dname / Path(*testdir.parts[-4:]) / file_path dst = testdir / file_path if src.exists(): + print("copying", src, dst) os.makedirs(dst.parent, exist_ok=True) shutil.copy(src, dst) @@ -988,6 +989,8 @@ def run_unit_tests(original_dname, testdir, history_fname, test_files): text=True, timeout=timeout, cwd=testdir, + encoding="utf-8", + errors="replace", ) success = result.returncode == 0