]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Resolve the system_test_dir in pytest
authorNicki Křížek <nicki@isc.org>
Mon, 26 Jan 2026 17:37:00 +0000 (18:37 +0100)
committerNicki Křížek <nicki@isc.org>
Tue, 27 Jan 2026 11:32:37 +0000 (12:32 +0100)
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

index 5eb1d28d459983f4c924d851288f9515b7275ef8..49126d9788a4b1e8625616ace2c511244a57574e 100644 (file)
@@ -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)
     )