Commit 04457a18 authored by Jonathan Maw's avatar Jonathan Maw

Make logging go to stdout when the test suite is being run in CI

parent 98a4492b
......@@ -22,6 +22,7 @@ import os
import datetime
import subprocess
import signal
import sys
from subprocess import CalledProcessError
from contextlib import contextmanager
from weakref import WeakValueDictionary
......@@ -548,7 +549,9 @@ class Plugin():
#
@contextmanager
def _output_file(self):
if not self.__log:
if 'BST_TEST_SUITE' in os.environ:
yield sys.stdout
elif not self.__log:
with open(os.devnull, "w") as output:
yield output
else:
......
......@@ -11,4 +11,6 @@ pep8ignore =
doc/source/conf.py ALL
tmp/* ALL
*/lib/python3* ALL
*/bin/* ALL
\ No newline at end of file
*/bin/* ALL
env =
D:BST_TEST_SUITE=True
......@@ -119,5 +119,6 @@ setup(name='BuildStream',
'pytest-datafiles',
'pytest-pep8',
'pytest-cov',
'pytest-env',
'pytest'],
zip_safe=False)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment