diff --git a/.gitignore b/.gitignore index 52daa4a..2ed5381 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,7 @@ pip-delete-this-directory.txt # Unit test / coverage reports htmlcov/ .testrepository/ +.stestr/* .tox/ .coverage .coverage.* diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..e46e139 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${TEST_PATH:-./glare/tests} +top_dir=./ \ No newline at end of file diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 4663d01..0000000 --- a/.testr.conf +++ /dev/null @@ -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 diff --git a/tox.ini b/tox.ini index 6b72fb1..ace008d 100644 --- a/tox.ini +++ b/tox.ini @@ -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}