mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-29 13:38:26 +00:00
Merge branch '4312-pytest-symlink-name-collision' into 'main'
Rename convenience symlink to pytest artifacts Closes #4312 See merge request isc-projects/bind9!8306
This commit is contained in:
commit
652f2725a0
@ -62,7 +62,7 @@ PRIORITY_TESTS_RE = re.compile("|".join(PRIORITY_TESTS))
|
||||
CONFTEST_LOGGER = logging.getLogger("conftest")
|
||||
SYSTEM_TEST_DIR_GIT_PATH = "bin/tests/system"
|
||||
SYSTEM_TEST_NAME_RE = re.compile(f"{SYSTEM_TEST_DIR_GIT_PATH}" + r"/([^/]+)")
|
||||
SYMLINK_REPLACEMENT_RE = re.compile(r"/tests(_sh(?=_))?(.*)\.py")
|
||||
SYMLINK_REPLACEMENT_RE = re.compile(r"/tests(_.*)\.py")
|
||||
|
||||
# ---------------------- Module initialization ---------------------------
|
||||
|
||||
@ -418,7 +418,7 @@ def system_test_dir(
|
||||
shutil.copytree(system_test_root / system_test_name, testdir)
|
||||
|
||||
# Create a convenience symlink with a stable and predictable name
|
||||
module_name = SYMLINK_REPLACEMENT_RE.sub(r"\2", request.node.name)
|
||||
module_name = SYMLINK_REPLACEMENT_RE.sub(r"\1", request.node.name)
|
||||
symlink_dst = system_test_root / module_name
|
||||
unlink(symlink_dst)
|
||||
symlink_dst.symlink_to(os.path.relpath(testdir, start=system_test_root))
|
||||
|
Loading…
x
Reference in New Issue
Block a user