diff --git a/.gitignore b/.gitignore index 44c82874..5038a03c 100644 --- a/.gitignore +++ b/.gitignore @@ -48,6 +48,7 @@ ChangeLog !/.gitreview !/.mailmap !/.pylintrc +!/.stestr.conf !/.testr.conf contrib/vagrant/.vagrant diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..6cc7a8d6 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./kuryr/tests/unit} +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index bf048698..00000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./kuryr/tests/unit} $LISTOPT $IDOPTION | cat -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/doc/requirements.txt b/doc/requirements.txt index c28b5b26..5ab3ef4c 100644 --- a/doc/requirements.txt +++ b/doc/requirements.txt @@ -1,3 +1,4 @@ openstackdocstheme>=1.18.1 # Apache-2.0 reno>=2.5.0 # Apache-2.0 -sphinx!=1.6.6,>=1.6.2 # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD +sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD diff --git a/test-requirements.txt b/test-requirements.txt index e0162f0f..c5ea2e59 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -9,6 +9,6 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 os-testr>=1.0.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 python-subunit>=1.0.0 # Apache-2.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>=2.2.0 # MIT diff --git a/tox.ini b/tox.ini index 47f7acdc..655508b5 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,8 @@ deps = whitelist_externals = sh find commands = find . -type f -name "*.py[c|o]" -delete - ostestr '{posargs}' + stestr run {posargs} + stestr slowest [testenv:fullstack] basepython = python2.7 @@ -46,10 +47,15 @@ commands = {posargs} [testenv:cover] basepython = python3 +setenv = + VIRTUAL_ENV={envdir} + PYTHON=coverage run --source kuryr --parallel-mode commands = - python setup.py test --coverage --testr-args='{posargs}' \ - --coverage-package-name=kuryr.lib - coverage report + stestr run {posargs} + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml + coverage report [testenv:docs] basepython = python3