Fix kuryr CI

This commit contains the following fixes that unblock the CI:

* Migrate from testrepository to stestr. Most of the OpenStack
  projects has done this migration.
* Sync Sphinx requirement.
* Fix coverage job.

Change-Id: Ic85842035d9e049fd47d4842797f0c37dabaa520
This commit is contained in:
Hongbin Lu 2019-07-06 19:58:52 +00:00
parent 818cd4111f
commit 756849a4e9
6 changed files with 17 additions and 10 deletions

1
.gitignore vendored
View File

@ -48,6 +48,7 @@ ChangeLog
!/.gitreview
!/.mailmap
!/.pylintrc
!/.stestr.conf
!/.testr.conf
contrib/vagrant/.vagrant

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=${OS_TEST_PATH:-./kuryr/tests/unit}
top_dir=./

View File

@ -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

View File

@ -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

View File

@ -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

14
tox.ini
View File

@ -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