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

TrivialFix:In the change[1] os_testr changed under the covers
from using testr to stestr, so that we now get the following
warning:
   ostestr.py:120:
   UserWarning: No .stestr.conf file found in the CWD.
   Please create one to to replace the .testr.conf. You
   can find a script to do this in the stestr git repository.
So remove the .testr.conf and add .stestr.conf which was
generated using a utility script as documented here [2].
[1] Id7cb2a39a8308f1413608dcf19273a1d7f33592e
[2] https://media.readthedocs.org/pdf/stestr/stable/stestr.pdf

Change-Id: I084215311928c0e66d45977748e5a2263bbc1444
This commit is contained in:
Mike Fedosin 2017-10-31 01:15:15 +03:00
parent ddf8d562a9
commit 209028bb4e
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}