summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZane Bitter <zbitter@redhat.com>2021-04-28 15:22:18 -0400
committerZane Bitter <zbitter@redhat.com>2021-04-29 09:56:08 -0400
commitb510d2d4d0fd5f157f3d660d876d5f89b0e3defd (patch)
treeb7e49a561996b41bef6864cc3d74f9bc88a09c69
parentc56cd4abc08840ba3670fbb024d3fe3e3b37209e (diff)
downloadironic-python-agent-b510d2d4d0fd5f157f3d660d876d5f89b0e3defd.tar.gz
unit tests: Capture log output
Debugging unit test failures is very challenging because all of the log output is mixed together. Capture the log messages and store them as part of the test, so that only log messages associated with failures are output, interleaved correctly with the results. This does not capture logs sent to stdout by _early_log(), although that would be a nice further improvement. Change-Id: I01e409ea73ff444e16caae0078e81585c703d5a5
-rw-r--r--tox.ini1
1 files changed, 1 insertions, 0 deletions
diff --git a/tox.ini b/tox.ini
index f5336da0..72f95b71 100644
--- a/tox.ini
+++ b/tox.ini
@@ -11,6 +11,7 @@ setenv =
VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
OS_TEST_PATH=./ironic_python_agent/tests/unit
+ OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
deps =