From: Nicki Křížek Date: Mon, 26 Jan 2026 17:37:00 +0000 (+0100) Subject: Resolve the system_test_dir in pytest X-Git-Tag: v9.18.45~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=77a627dfd54748140eedf84eff6ab735b55edd86;p=thirdparty%2Fbind9.git 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) --- diff --git a/bin/tests/system/conftest.py b/bin/tests/system/conftest.py index 790bb66e9c7..8fc9dd8a11a 100644 --- a/bin/tests/system/conftest.py +++ b/bin/tests/system/conftest.py @@ -445,7 +445,9 @@ def system_test_dir(request, env, 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(f"{env['TOP_BUILDDIR']}/{SYSTEM_TEST_DIR_GIT_PATH}") + system_test_root = Path( + f"{env['TOP_BUILDDIR']}/{SYSTEM_TEST_DIR_GIT_PATH}" + ).resolve() testdir = Path( tempfile.mkdtemp(prefix=f"{system_test_name}_tmp_", dir=system_test_root) )