Ensure all the variables are initialized when running the main function
of isctest module. This enables proper environment variables during test
script development when only conf.sh is sourced, rather than the script
being executed by the pytest runner.
(cherry picked from commit
d7ace928b5e9520b0b68169abef43be3f6d50a0c)
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
-from .vars import ALL
+import logging
+
+from . import log
+from .vars import ALL, init_vars
if __name__ == "__main__":
+ # use root logger as fallback - we're not interested in proper logs here
+ log.basic.LOGGERS["conftest"] = logging.getLogger()
+
+ init_vars()
for name, value in ALL.items():
print(f"export {name}={value}")
from typing import Dict, Optional
-CONFTEST_LOGGER = logging.getLogger("conftest")
LOG_FORMAT = "%(asctime)s %(levelname)7s:%(name)s %(message)s"
LOGGERS = {
cwd=tmpdir,
check=False,
stdout=subprocess.DEVNULL,
+ stderr=subprocess.PIPE,
)
if proc.returncode == 0:
return True
+ log.debug(f"dnssec-keygen stderr: {proc.stderr.decode('utf-8')}")
log.info("algorithm %s not supported", alg.name)
return False