From 92844eb2f8749f149782216d208a2234029c8075 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Fri, 17 Jul 2020 13:41:15 -0400 Subject: [PATCH] tests: Wire pytest --log-level=debug to cli tests debug infrastructure Signed-off-by: Cole Robinson --- tests/conftest.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index f729040e..4b7d816d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -79,6 +79,7 @@ def pytest_collection_modifyitems(config, items): def pytest_configure(config): + import tests from tests.utils import clistate clistate.url_iso_only = config.getoption("--urls-iso-only") @@ -86,3 +87,6 @@ def pytest_configure(config): clistate.url_skip_libosinfo = config.getoption("--urls-skip-libosinfo") clistate.url_force_libosinfo = config.getoption("--urls-force-libosinfo") clistate.regenerate_output = config.getoption("--regenerate-output") + + clistate.debug = config.getoption("--log-level") == "debug" + tests.setup_logging()