diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 0000000..bc59285 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=./masakarimonitors/tests/unit +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index 6d83b3c..0000000 --- a/.testr.conf +++ /dev/null @@ -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 ./ . $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/tox.ini b/tox.ini index e9e3ce3..fd03dcc 100644 --- a/tox.ini +++ b/tox.ini @@ -15,25 +15,24 @@ whitelist_externals = bash find rm env -# By default ostestr will set concurrency +# By default stestr will set concurrency # to ncpu, to specify something else use # the concurrency= option. # call ie: 'tox -epy27 -- --concurrency=4' commands = find . -type f -name "*.pyc" -delete - rm -Rf .testrepository/times.dbm passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY OS_DEBUG GENERATE_HASHES [testenv:py27] commands = {[testenv]commands} - ostestr '{posargs}' + stestr run {posargs} [testenv:py36] basepython = python3.6 commands = {[testenv]commands} - ostestr '{posargs}' + stestr run {posargs} [testenv:genconfig] basepython = python3 @@ -49,7 +48,14 @@ commands = {posargs} [testenv:cover] basepython = python3 -commands = python setup.py test --coverage --testr-args='{posargs}' +setenv = + VIRTUAL_ENV={envdir} + PYTHON=coverage run --source masakarimonitors --parallel-mode +commands = + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:docs] basepython = python3