mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Ignore tempdirs during pytest collection phase
(cherry picked from commit 8a406b73c9)
This commit is contained in:
parent
b8d6434d5d
commit
0df2ea8fab
2 changed files with 9 additions and 0 deletions
1
bin/tests/system/.gitignore
vendored
1
bin/tests/system/.gitignore
vendored
|
|
@ -22,3 +22,4 @@ parallel.mk
|
|||
/start.sh
|
||||
/stop.sh
|
||||
/ifconfig.sh
|
||||
/*_tmp_*
|
||||
|
|
|
|||
|
|
@ -156,6 +156,14 @@ if os.getenv("LEGACY_TEST_RUNNER", "0") == "0":
|
|||
raise exc
|
||||
logging.debug(proc.stdout)
|
||||
|
||||
def pytest_ignore_collect(path):
|
||||
# System tests are executed in temporary directories inside
|
||||
# bin/tests/system. These temporary directories contain all files
|
||||
# needed for the system tests - including tests_*.py files. Make sure to
|
||||
# ignore these during test collection phase. Otherwise, test artifacts
|
||||
# from previous runs could mess with the runner.
|
||||
return "_tmp_" in str(path)
|
||||
|
||||
@pytest.hookimpl(tryfirst=True, hookwrapper=True)
|
||||
def pytest_runtest_makereport(item):
|
||||
"""Hook that is used to expose test results to session (for use in fixtures)."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue