diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..bf333991 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,2 @@ +[run] +omit = */cloudbaseinit/tests/resources/* diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..343936fd --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./cloudbaseinit/tests} +top_dir=./ diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index ea84be6f..33f6af25 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -67,11 +67,10 @@ bug_tag = '' # |version| and |release|, also used in various other places throughout the # built documents. # -from cloubaseinit import version +# Release notes are version independent, no need to set version and release. +version = "" # The full version, including alpha/beta/rc tags. -release = version.get_version() -# The short X.Y version. -version = version.get_canonical_version() +release = "" # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/test-requirements.txt b/test-requirements.txt index 783040e5..e6c5a737 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -6,6 +6,7 @@ sphinx oslosphinx testtools>=0.9.32 testrepository>=0.0.18 +stestr>=2.0.0 openstackdocstheme>=1.11.0 # Apache-2.0 # releasenotes reno>=1.8.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 4fe27796..0a5d3b6f 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,16 @@ commands = flake8 {posargs} commands = bash tools/lintstack.sh [testenv:cover] -commands = python setup.py testr --coverage --testr-args='{posargs}' +basepython = python2.7 +setenv = + {[testenv]setenv} + PYTHON=coverage run --source cloudbaseinit --parallel-mode +commands = + stestr run --no-subunit-trace {posargs} + coverage combine + coverage report --fail-under=82 --skip-covered + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:venv] commands = {posargs}