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
diff --git a/tests/test_scheduler.py b/tests/test_scheduler.py
index da9b431..100b924 100644
--- a/tests/test_scheduler.py
+++ b/tests/test_scheduler.py
@@ -680,7 +680,9 @@
             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")