From 2ce23fe37f58c35585353bd431e86a7ded25f4bd Mon Sep 17 00:00:00 2001 From: Paul Glass Date: Tue, 18 Aug 2015 20:20:19 +0000 Subject: [PATCH] Show functional test request logging * Failed test cases will show all captured logging * Forward OS_*_CAPTURE environment variables along from tox to testr Change-Id: Ice9a64d07bb77dd46fb1da6a8ffaa8fd85d5f38b --- functionaltests/__init__.py | 7 +++++++ tox.ini | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/functionaltests/__init__.py b/functionaltests/__init__.py index e69de29bb..f96945ffa 100644 --- a/functionaltests/__init__.py +++ b/functionaltests/__init__.py @@ -0,0 +1,7 @@ +import logging + +logging.basicConfig( + filename='functional-tests.log', + filemode='w', + level=logging.DEBUG, +) diff --git a/tox.ini b/tox.ini index 130a069fe..c5e72a1d9 100644 --- a/tox.ini +++ b/tox.ini @@ -67,6 +67,10 @@ usedevelop = False setenv = VIRTUAL_ENV={envdir} OS_TEST_PATH=functionaltests/ passenv = TEMPEST_CONFIG + OS_STDOUT_CAPTURE + OS_STDERR_CAPTURE + OS_LOG_CAPTURE + OS_DEBUG [testenv:venv] commands = {posargs}