Merge "Default to not capturing log output in tests"
This commit is contained in:
commit
c6282c1319
@ -1,4 +1,4 @@
|
||||
[DEFAULT]
|
||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ neutron/tests/unit $LISTOPT $IDOPTION
|
||||
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ neutron/tests/unit $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
||||
|
@ -42,7 +42,15 @@ class BaseTestCase(testtools.TestCase):
|
||||
_level = logging.DEBUG
|
||||
else:
|
||||
_level = logging.INFO
|
||||
self.useFixture(fixtures.FakeLogger(format=LOG_FORMAT, level=_level))
|
||||
capture_logs = os.environ.get('OS_LOG_CAPTURE') in TRUE_STRING
|
||||
if not capture_logs:
|
||||
logging.basicConfig(format=LOG_FORMAT, level=_level)
|
||||
self.log_fixture = self.useFixture(
|
||||
fixtures.FakeLogger(
|
||||
format=LOG_FORMAT,
|
||||
level=_level,
|
||||
nuke_handlers=capture_logs,
|
||||
))
|
||||
|
||||
test_timeout = int(os.environ.get('OS_TEST_TIMEOUT', 0))
|
||||
if test_timeout == -1:
|
||||
|
Loading…
x
Reference in New Issue
Block a user