Browse Source

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
changes/53/34653/3
Monty Taylor 9 years ago committed by Jenkins
parent
commit
e6a6c403db
  1. 2
      .testr.conf
  2. 4
      tests/test_scheduler.py

2
.testr.conf

@ -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

4
tests/test_scheduler.py

@ -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")

Loading…
Cancel
Save