2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 22:45:39 +00:00

Compile system test binaries during make

Using check_PROGRAMS would postpone compiling the binaries needed by
system tests until `make check` would be called. Since it's preferable
to invoke pytest directly to run the system test suite, compile these
binaries without installing them during `make all` instead by using
noinst_PROGRAMS.

This removes the need to use TESTS= make -e check hack invoked from
pytest to work around this issue.
This commit is contained in:
Tom Krizek
2023-08-07 16:59:11 +02:00
parent 664d7c642d
commit 21980b43b8
6 changed files with 5 additions and 27 deletions

View File

@@ -189,28 +189,6 @@ else:
# Ensure this hook only runs on the main pytest instance if xdist is
# used to spawn other workers.
if not XDIST_WORKER:
CONFTEST_LOGGER.debug("compiling required files")
env = os.environ.copy()
env["TESTS"] = "" # disable automake test framework - compile-only
try:
# FUTURE: Remove the need to run this compilation command
# before executing tests. Currently it's only here to have
# on-par functionality with the legacy test framework.
proc = subprocess.run(
"make -e check",
shell=True,
check=True,
cwd=FILE_DIR,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
env=env,
)
except subprocess.CalledProcessError as exc:
CONFTEST_LOGGER.debug(exc.stdout)
CONFTEST_LOGGER.error("failed to compile test files: %s", exc)
raise exc
CONFTEST_LOGGER.debug(proc.stdout)
if config.pluginmanager.has_plugin("xdist") and config.option.numprocesses:
# system tests depend on module scope for setup & teardown
# enforce use "loadscope" scheduler or disable paralelism