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 ...@@ -22,6 +22,7 @@ import os
import datetime import datetime
import subprocess import subprocess
import signal import signal
import sys
from subprocess import CalledProcessError from subprocess import CalledProcessError
from contextlib import contextmanager from contextlib import contextmanager
from weakref import WeakValueDictionary from weakref import WeakValueDictionary
...@@ -548,7 +549,9 @@ class Plugin(): ...@@ -548,7 +549,9 @@ class Plugin():
# #
@contextmanager @contextmanager
def _output_file(self): 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: with open(os.devnull, "w") as output:
yield output yield output
else: else:
......
...@@ -11,4 +11,6 @@ pep8ignore = ...@@ -11,4 +11,6 @@ pep8ignore =
doc/source/conf.py ALL doc/source/conf.py ALL
tmp/* ALL tmp/* ALL
*/lib/python3* ALL */lib/python3* ALL
*/bin/* ALL */bin/* ALL
\ No newline at end of file env =
D:BST_TEST_SUITE=True
...@@ -119,5 +119,6 @@ setup(name='BuildStream', ...@@ -119,5 +119,6 @@ setup(name='BuildStream',
'pytest-datafiles', 'pytest-datafiles',
'pytest-pep8', 'pytest-pep8',
'pytest-cov', 'pytest-cov',
'pytest-env',
'pytest'], 'pytest'],
zip_safe=False) 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