Skip to content

Commit

Permalink
Switch to stestr
Browse files Browse the repository at this point in the history
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: I55060b1d99b9a00b20c98fbb429d072568265695
  • Loading branch information
Vu Cong Tuan committed Jul 16, 2018
1 parent 2e6ef0c commit 32a3244
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 41 deletions.
2 changes: 1 addition & 1 deletion .gitignore
@@ -1,6 +1,6 @@
.coverage
.venv
.testrepository
.stestr/
subunit.log
.tox
*,cover
Expand Down
3 changes: 3 additions & 0 deletions .stestr.conf
@@ -0,0 +1,3 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./novaclient/tests/unit}
top_dir=./
7 changes: 0 additions & 7 deletions .testr.conf

This file was deleted.

4 changes: 1 addition & 3 deletions lower-constraints.txt
Expand Up @@ -48,7 +48,6 @@ netifaces==0.10.4
openstacksdk==0.11.2
os-client-config==1.28.0
os-service-types==1.2.0
os-testr==1.0.0
osc-lib==1.8.0
oslo.concurrency==3.25.0
oslo.config==5.2.0
Expand Down Expand Up @@ -96,11 +95,10 @@ simplejson==3.5.1
six==1.10.0
smmap==0.9.0
statsd==3.2.1
stestr==1.0.0
stevedore==1.20.0
tempest==17.1.0
tenacity==3.2.1
testrepository==0.0.18
stestr==2.0.0
testscenarios==0.4
testtools==2.2.0
traceback2==1.4.0
Expand Down
3 changes: 1 addition & 2 deletions test-requirements.txt
Expand Up @@ -15,9 +15,8 @@ python-glanceclient>=2.8.0 # Apache-2.0
python-neutronclient>=6.7.0 # Apache-2.0
requests-mock>=1.2.0 # Apache-2.0
os-client-config>=1.28.0 # Apache-2.0
os-testr>=1.0.0 # Apache-2.0
osprofiler>=1.4.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
tempest>=17.1.0 # Apache-2.0
16 changes: 0 additions & 16 deletions tools/pretty_tox.sh

This file was deleted.

22 changes: 10 additions & 12 deletions tox.ini
Expand Up @@ -9,7 +9,6 @@ usedevelop = True
# tox is silly... these need to be separated by a newline....
whitelist_externals =
find
bash
rm
passenv = ZUUL_CACHE_DIR
REQUIREMENTS_PIP_LOCATION
Expand All @@ -20,9 +19,7 @@ deps =
-r{toxinidir}/requirements.txt
commands =
find . -type f -name "*.pyc" -delete
bash tools/pretty_tox.sh '{posargs}'
# there is also secret magic in pretty_tox.sh which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.
stestr run {posargs}

[testenv:pep8]
basepython = python3
Expand Down Expand Up @@ -63,26 +60,27 @@ commands =
[testenv:functional]
basepython = python2.7
passenv = OS_NOVACLIENT_TEST_NETWORK
setenv =
OS_TEST_PATH = ./novaclient/tests/functional
commands =
bash tools/pretty_tox.sh '--concurrency=1 {posargs}'
stestr --test-path=./novaclient/tests/functional run --concurrency=1 {posargs}
python novaclient/tests/functional/hooks/check_resources.py

[testenv:functional-py35]
basepython = python3.5
passenv = OS_NOVACLIENT_TEST_NETWORK
setenv =
OS_TEST_PATH = ./novaclient/tests/functional
commands =
bash tools/pretty_tox.sh '--concurrency=1 {posargs}'
stestr --test-path=./novaclient/tests/functional run --concurrency=1 {posargs}
python novaclient/tests/functional/hooks/check_resources.py

[testenv:cover]
basepython = python3
setenv =
PYTHON=coverage run --source novaclient --parallel-mode
commands =
python setup.py testr --coverage --testr-args='{posargs}'
coverage report
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report

[flake8]
# Following checks should be enabled in the future.
Expand Down

0 comments on commit 32a3244

Please sign in to comment.