Migrate to stestr
This change migrates the testing suite from using ostestr and testr to using stester. Also cleaned up a missing space from tox.ini. Change-Id: I886401a1efce6cb617a4db7a90ec9454bbea1d71
This commit is contained in:
parent
a98519927b
commit
ce108f0eda
|
@ -7,7 +7,7 @@ venv*
|
||||||
.eggs/
|
.eggs/
|
||||||
.idea/
|
.idea/
|
||||||
.tox
|
.tox
|
||||||
.testrepository
|
.stestr
|
||||||
build/*
|
build/*
|
||||||
cover/*
|
cover/*
|
||||||
.coverage*
|
.coverage*
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
[DEFAULT]
|
||||||
|
test_path=${OS_TEST_PATH:-./tests/unit}
|
||||||
|
top_dir=./
|
||||||
|
group_regex=.*(test_cert_setup)
|
|
@ -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 ./ ./tests $LISTOPT $IDOPTION
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
|
@ -5,7 +5,7 @@ coverage!=4.4,>=4.0 # Apache-2.0
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
stestr>=1.0.0 # Apache-2.0
|
||||||
testscenarios>=0.4 # Apache-2.0/BSD
|
testscenarios>=0.4 # Apache-2.0/BSD
|
||||||
testtools>=1.4.0 # MIT
|
testtools>=1.4.0 # MIT
|
||||||
oslotest>=1.10.0 # Apache-2.0
|
oslotest>=1.10.0 # Apache-2.0
|
||||||
|
|
15
tox.ini
15
tox.ini
|
@ -10,13 +10,14 @@ setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
BRANCH_NAME=master
|
BRANCH_NAME=master
|
||||||
CLIENT_NAME=bandit
|
CLIENT_NAME=bandit
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
coverage erase
|
find bandit -type f -name "*.pyc" -delete
|
||||||
python setup.py testr --coverage --slowest --testr-args='{posargs}'
|
stestr run {posargs}
|
||||||
coverage report -m
|
whitelist_externals =
|
||||||
|
find
|
||||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||||
|
|
||||||
[testenv:debug]
|
[testenv:debug]
|
||||||
|
@ -50,8 +51,12 @@ commands = bandit-baseline -r bandit -ll -ii
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
|
setenv =
|
||||||
|
{[testenv]setenv}
|
||||||
|
PYTHON=coverage run --source bandit --parallel-mode
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --coverage --testr-args='{posargs}'
|
coverage erase
|
||||||
|
stestr run '{posargs}'
|
||||||
coverage report
|
coverage report
|
||||||
|
|
||||||
[testenv:openstack_coverage]
|
[testenv:openstack_coverage]
|
||||||
|
|
Loading…
Reference in New Issue