Browse Source

Switch to stestr

According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I11f742b525d8d7328a9d46f0bd46da112e27ad82
changes/28/618328/5
Steve Baker 3 years ago
committed by Sorin Sbarnea
parent
commit
5ac404e53e
  1. 1
      .gitignore
  2. 3
      .stestr.conf
  3. 7
      .testr.conf
  4. 2
      lower-constraints.txt
  5. 2
      test-requirements.txt
  6. 17
      tox.ini

1
.gitignore

@ -40,6 +40,7 @@ install-undercloud.log
.tox
nosetests.xml
.testrepository
.stestr/*
# Translations
*.mo

3
.stestr.conf

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TEST_PATH:-./tripleoclient/tests}
top_dir=./

7
.testr.conf

@ -1,7 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

2
lower-constraints.txt

@ -138,10 +138,10 @@ sqlalchemy-migrate==0.11.0
SQLAlchemy==1.0.10
sqlparse==0.2.2
statsd==3.2.1
stestr==2.0.0
stevedore==1.20.0
Tempita==0.5.2
tenacity==4.9.0
testrepository==0.0.18
testscenarios===0.4
testtools==2.2.0
tooz==1.58.0

2
test-requirements.txt

@ -7,7 +7,7 @@ coverage!=4.4,>=4.0 # Apache-2.0
docutils>=0.11 # OSI-Approved Open Source, Public Domain
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0.0 # BSD
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
requests-mock>=1.2.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD

17
tox.ini

@ -6,16 +6,19 @@ skipsdist = True
[testenv]
usedevelop = True
install_command = pip install {opts} {packages}
passenv =
TERM
setenv =
VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
HOME={envdir}
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = python setup.py testr --slowest --testr-args='{posargs}'
commands = stestr run {posargs}
[testenv:bindep]
basepython = python3
@ -37,10 +40,16 @@ passenv = *
[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source tripleoclient --parallel-mode
HOME={envdir}
commands =
python setup.py testr --coverage --testr-args='{posargs}'
coverage combine
coverage report -m
coverage erase
stestr run --color {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:debug]
basepython = python3

Loading…
Cancel
Save