Merge "tests: replace .testr.conf with .stestr.conf"

This commit is contained in:
Zuul 2017-11-02 17:35:32 +00:00 committed by Gerrit Code Review
commit d11461311b
4 changed files with 11 additions and 12 deletions

1
.gitignore vendored
View File

@ -35,6 +35,7 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.testrepository/
.stestr/*
.tox/
.coverage
.coverage.*

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TEST_PATH:-./glare/tests}
top_dir=./

View File

@ -1,8 +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:-160} \
${PYTHON:-python} -m subunit.run discover -t ./ ./glare/tests $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

11
tox.ini
View File

@ -34,11 +34,14 @@ commands =
bandit -c bandit.yaml -r glare -n5 -p gate
[testenv:cover]
basepython = python2.7
setenv = VIRTUAL_ENV={envdir}
setenv =
{[testenv]setenv}
PYTHON=coverage run --source glare --parallel-mode --omit="*/test*"
commands =
coverage erase
python setup.py testr --coverage --testr-args='^(?!.*test.*coverage).*$' --omit="*/test*"
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:venv]
commands = {posargs}