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
2
.gitignore
vendored
2
.gitignore
vendored
@ -7,7 +7,7 @@ venv*
|
||||
.eggs/
|
||||
.idea/
|
||||
.tox
|
||||
.testrepository
|
||||
.stestr
|
||||
build/*
|
||||
cover/*
|
||||
.coverage*
|
||||
|
4
.stestr.conf
Normal file
4
.stestr.conf
Normal file
@ -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
|
||||
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
|
||||
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
|
||||
testtools>=1.4.0 # MIT
|
||||
oslotest>=1.10.0 # Apache-2.0
|
||||
|
15
tox.ini
15
tox.ini
@ -10,13 +10,14 @@ setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
BRANCH_NAME=master
|
||||
CLIENT_NAME=bandit
|
||||
VIRTUAL_ENV={envdir}
|
||||
VIRTUAL_ENV={envdir}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands =
|
||||
coverage erase
|
||||
python setup.py testr --coverage --slowest --testr-args='{posargs}'
|
||||
coverage report -m
|
||||
find bandit -type f -name "*.pyc" -delete
|
||||
stestr run {posargs}
|
||||
whitelist_externals =
|
||||
find
|
||||
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
|
||||
|
||||
[testenv:debug]
|
||||
@ -50,8 +51,12 @@ commands = bandit-baseline -r bandit -ll -ii
|
||||
[testenv:cover]
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
setenv =
|
||||
{[testenv]setenv}
|
||||
PYTHON=coverage run --source bandit --parallel-mode
|
||||
commands =
|
||||
python setup.py testr --coverage --testr-args='{posargs}'
|
||||
coverage erase
|
||||
stestr run '{posargs}'
|
||||
coverage report
|
||||
|
||||
[testenv:openstack_coverage]
|
||||
|
Loading…
x
Reference in New Issue
Block a user