Skip to content

Commit 5e00034

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Switch to use stestr directly"
2 parents 65d5d3d + bafe535 commit 5e00034

3 files changed

Lines changed: 17 additions & 13 deletions

File tree

openstackclient/tests/functional/run_ostestr.sh renamed to openstackclient/tests/functional/run_stestr.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ fi
1313
echo 'Running tests with:'
1414
env | grep OS
1515

16-
ostestr $*
16+
stestr run $*

test-requirements.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ requests-mock>=1.1.0 # Apache-2.0
1515
sphinx>=1.6.2 # BSD
1616
stevedore>=1.20.0 # Apache-2.0
1717
os-client-config>=1.28.0 # Apache-2.0
18-
os-testr>=1.0.0 # Apache-2.0
19-
testrepository>=0.0.18 # Apache-2.0/BSD
18+
stestr>=1.0.0 # Apache-2.0
2019
testtools>=2.2.0 # MIT
2120
tempest>=17.1.0 # Apache-2.0
2221
osprofiler>=1.4.0 # Apache-2.0

tox.ini

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ deps =
1414
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
1515
-r{toxinidir}/test-requirements.txt
1616
-r{toxinidir}/requirements.txt
17-
commands = ostestr {posargs}
18-
whitelist_externals = ostestr
17+
commands = stestr run {posargs}
18+
whitelist_externals = stestr
1919

2020
[testenv:fast8]
2121
# Use same environment directory as pep8 env to save space and install time
@@ -63,36 +63,41 @@ commands =
6363
pip install -q -U -e "git+file://{toxinidir}/../os-client-config#egg=os_client_config"
6464
pip install -q -e "git+file://{toxinidir}/../python-openstacksdk#egg=openstacksdk"
6565
pip freeze
66-
ostestr {posargs}
67-
whitelist_externals = ostestr
66+
stestr run {posargs}
67+
whitelist_externals = stestr
6868

6969
[testenv:functional]
7070
setenv = OS_TEST_PATH=./openstackclient/tests/functional
7171
passenv = OS_*
72-
whitelist_externals = openstackclient/tests/functional/run_ostestr.sh
72+
whitelist_externals = openstackclient/tests/functional/run_stestr.sh
7373
commands =
74-
{toxinidir}/openstackclient/tests/functional/run_ostestr.sh {posargs}
74+
{toxinidir}/openstackclient/tests/functional/run_stestr.sh {posargs}
7575

7676
[testenv:functional-tips]
7777
setenv = OS_TEST_PATH=./openstackclient/tests/functional
7878
passenv = OS_*
79-
whitelist_externals = openstackclient/tests/functional/run_ostestr.sh
79+
whitelist_externals = openstackclient/tests/functional/run_stestr.sh
8080
commands =
8181
pip install -q -U -e "git+file://{toxinidir}/../cliff#egg=cliff"
8282
pip install -q -U -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth"
8383
pip install -q -U -e "git+file://{toxinidir}/../osc-lib#egg=osc_lib"
8484
pip install -q -U -e "git+file://{toxinidir}/../os-client-config#egg=os_client_config"
8585
pip install -q -U -e "git+file://{toxinidir}/../python-openstacksdk#egg=openstacksdk"
8686
pip freeze
87-
{toxinidir}/openstackclient/tests/functional/run_ostestr.sh {posargs}
87+
{toxinidir}/openstackclient/tests/functional/run_stestr.sh {posargs}
8888

8989
[testenv:venv]
9090
commands = {posargs}
9191

9292
[testenv:cover]
93+
setenv =
94+
VIRTUAL_ENV={envdir}
95+
PYTHON=coverage run --source openstackclient --parallel-mode
9396
commands =
94-
python setup.py test --coverage --testr-args='{posargs}'
95-
coverage report
97+
stestr -q run {posargs}
98+
coverage combine
99+
coverage html -d cover
100+
coverage xml -o cover/coverage.xml
96101

97102
[testenv:debug]
98103
passenv = OS_*

0 commit comments

Comments
 (0)