Add ability to skip log capture.

Change-Id: I8f3ac5c469e9d530d1ac7776c7488d0c42cdf1ad
Reviewed-on: https://review.openstack.org/35329
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Monty Taylor 2013-07-02 09:25:55 -07:00 committed by Jenkins
parent bc7588343f
commit e6a6c403db
2 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,4 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ tests $LISTOPT $IDOPTION
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ tests $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -680,7 +680,9 @@ class TestScheduler(testtools.TestCase):
stderr = self.useFixture(fixtures.StringStream('stderr')).stream
self.useFixture(fixtures.MonkeyPatch('sys.stderr', stderr))
self.useFixture(fixtures.NestedTempfile())
self.log_fixture = self.useFixture(fixtures.FakeLogger())
if (os.environ.get('OS_LOG_CAPTURE') == 'True' or
os.environ.get('OS_LOG_CAPTURE') == '1'):
self.useFixture(fixtures.FakeLogger())
tmp_root = os.environ.get("ZUUL_TEST_ROOT", tempfile.mkdtemp())
self.test_root = os.path.join(tmp_root, "zuul-test")