summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildstream/plugin.py5
-rw-r--r--setup.cfg4
-rwxr-xr-xsetup.py1
3 files changed, 8 insertions, 2 deletions
diff --git a/buildstream/plugin.py b/buildstream/plugin.py
index f66e5c072..59753d247 100644
--- a/buildstream/plugin.py
+++ b/buildstream/plugin.py
@@ -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:
diff --git a/setup.cfg b/setup.cfg
index a89a2e902..96213b641 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -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
diff --git a/setup.py b/setup.py
index 42c4f4855..a36566f9a 100755
--- a/setup.py
+++ b/setup.py
@@ -119,5 +119,6 @@ setup(name='BuildStream',
'pytest-datafiles',
'pytest-pep8',
'pytest-cov',
+ 'pytest-env',
'pytest'],
zip_safe=False)