From 095040374407343b65dec0d8c57050c4d9ed7bc2 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 28 Feb 2019 15:23:23 +0000 Subject: [PATCH] tox: Suppress output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Moisés Guimarães de Medeiros --- lower-constraints.txt | 2 +- test-requirements.txt | 2 +- tox.ini | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/lower-constraints.txt b/lower-constraints.txt index fd5e25c9..a68ae4fe 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -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 diff --git a/test-requirements.txt b/test-requirements.txt index 3db674e3..ffbe9cc8 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -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 diff --git a/tox.ini b/tox.ini index a3dffb79..1d32d6bd 100644 --- a/tox.ini +++ b/tox.ini @@ -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