From 566f15b0399c8d450bee1535277f220d451ecf80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= Date: Mon, 26 Jan 2026 18:37:00 +0100 Subject: [PATCH] Resolve the system_test_dir in pytest If the system_test_dir contains a symlink, then it might cause issues further down when using relative_to(), unless it is resolved first. This has been observed on FreeBSD13 in CI where /home is a symlink to /usr/home. (cherry picked from commit b1e346905912db53c9e92b2729849e3bb6f74816) --- bin/tests/system/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/tests/system/conftest.py b/bin/tests/system/conftest.py index 5eb1d28d45..49126d9788 100644 --- a/bin/tests/system/conftest.py +++ b/bin/tests/system/conftest.py @@ -397,7 +397,7 @@ def system_test_dir(request, system_test_name, expected_artifacts): ), f"Unexpected files found in test directory: {unexpected_files}" # Create a temporary directory with a copy of the original system test dir contents - system_test_root = Path(os.environ["builddir"]) + system_test_root = Path(os.environ["builddir"]).resolve() testdir = Path( tempfile.mkdtemp(prefix=f"{system_test_name}_tmp_", dir=system_test_root) )