Switch to using stestr
stestr is a fork of testrepository, designed specifically to concentrate on being a dedicated test runner. [1] The testrepository project is basically not active anymore and has several long standing bugs and useablility issues. stestr is still actively maintained and fixes a large number of those issues with testrepository. [1] https://github.com/mtreinish/stestr Change-Id: I9b8049fd2c78d8f90aed5a8b35c0a9b40ad8c463
This commit is contained in:
parent
e239dcd66b
commit
73ef1f549c
1
.gitignore
vendored
1
.gitignore
vendored
@ -28,6 +28,7 @@ cover
|
||||
.tox
|
||||
nosetests.xml
|
||||
.testrepository
|
||||
.stestr
|
||||
|
||||
# Translations
|
||||
*.mo
|
||||
|
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[DEFAULT]
|
||||
test_path=./shade/tests/unit
|
||||
top_dir=./
|
@ -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 ./ ${OS_TEST_PATH:-./shade/tests/unit} $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
@ -45,7 +45,7 @@ echo "Running shade functional test suite"
|
||||
set +e
|
||||
sudo -E -H -u jenkins tox -e$tox_env
|
||||
EXIT_CODE=$?
|
||||
sudo testr last --subunit > $WORKSPACE/tempest.subunit
|
||||
sudo stestr last --subunit > $WORKSPACE/tempest.subunit
|
||||
.tox/$tox_env/bin/pbr freeze
|
||||
set -e
|
||||
|
||||
|
@ -11,7 +11,7 @@ openstackdocstheme>=1.16.0 # Apache-2.0
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
requests-mock>=1.1.0 # Apache-2.0
|
||||
sphinx>=1.6.2 # BSD
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
stestr>=1.0.0 # Apache-2.0
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=1.4.0 # MIT
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
|
24
tox.ini
24
tox.ini
@ -16,24 +16,21 @@ setenv =
|
||||
BRANCH_NAME=master
|
||||
CLIENT_NAME=shade
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
commands = python setup.py testr --slowest --testr-args='{posargs}'
|
||||
commands = stestr run {posargs}
|
||||
stestr slowest
|
||||
|
||||
[testenv:functional]
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
OS_TEST_PATH = ./shade/tests/functional
|
||||
passenv = OS_* SHADE_* UPPER_CONSTRAINTS_FILE
|
||||
commands = python setup.py testr --slowest --testr-args='--concurrency=1 {posargs}'
|
||||
commands = stestr --test-path ./shade/tests/functional run --serial {posargs}
|
||||
stestr slowest
|
||||
|
||||
[testenv:functional-tips]
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
OS_TEST_PATH = ./shade/tests/functional
|
||||
passenv = OS_* SHADE_* UPPER_CONSTRAINTS_FILE
|
||||
whitelist_externals = bash
|
||||
commands =
|
||||
bash -x {toxinidir}/extras/install-tips.sh
|
||||
python setup.py testr --slowest --testr-args='--concurrency=1 {posargs}'
|
||||
stestr --test-path ./shade/tests/functional run --serial {posargs}
|
||||
stestr slowest
|
||||
|
||||
[testenv:pep8]
|
||||
commands = flake8 shade
|
||||
@ -48,7 +45,14 @@ commands =
|
||||
oslo_debug_helper {posargs}
|
||||
|
||||
[testenv:cover]
|
||||
commands = python setup.py testr --coverage --testr-args='{posargs}'
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run --source shade --parallel-mode
|
||||
commands =
|
||||
stestr run {posargs}
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
|
||||
[testenv:ansible]
|
||||
# Need to pass some env vars for the Ansible playbooks
|
||||
|
Loading…
Reference in New Issue
Block a user