tox: Suppress output

As noted in I1678bcd26b41fdf09f98c36fc095d6d4c1826deb (for pbr), we need
to pass some flags [1] to stestr to ensure stdout is captured in
additional to any logs.

We also make it easier to override this capturing and remove some errant
whitespace.

[1] https://github.com/mtreinish/stestr/commit/1316ebd7

Change-Id: I5d98c2b8e31b4eb4741dfa5055a5628140b1add5
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
This commit is contained in:
Stephen Finucane 2019-02-28 15:23:23 +00:00 committed by Moisés Guimarães de Medeiros
parent 3e905ff28c
commit 0950403744
3 changed files with 9 additions and 8 deletions

View File

@ -46,7 +46,7 @@ smmap==0.9.0
snowballstemmer==1.2.1
Sphinx==1.6.2
sphinxcontrib-websupport==1.0.1
stestr==2.0.0
stestr==2.1.0
stevedore==1.20.0
testscenarios==0.4
testtools==2.2.0

View File

@ -5,7 +5,7 @@ hacking>=1.1.0,<1.2.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
stestr>=2.1.0 # Apache-2.0
testtools>=2.2.0 # MIT
oslotest>=3.2.0 # Apache-2.0

13
tox.ini
View File

@ -7,16 +7,17 @@ envlist = py35,py27,pep8
install_command = pip install {opts} {packages}
whitelist_externals =
find
setenv = OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
setenv =
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:1}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:1}
OS_TEST_TIMEOUT={env:OS_TEST_TIMEOUT:60}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
find . -type f -name "*.pyc" -delete
stestr run {posargs}
stestr run --suppress-attachments {posargs}
stestr slowest
[testenv:lower-constraints]
@ -55,8 +56,8 @@ basepython = python3
whitelist_externals = rm
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -fr doc/build
sphinx-build -W -b html doc/source doc/build/html {posargs}
rm -fr doc/build
sphinx-build -W -b html doc/source doc/build/html {posargs}
[testenv:bandit]
basepython = python3