Browse Source

Update python-octaviaclient tox for stestr

This patch updates the python-octaviaclient tox environment to use stestr.

Change-Id: I617834260efa6853496b001a92596cb09c623ed7
changes/24/570424/2
Michael Johnson 3 years ago
committed by Adam Harwell
parent
commit
22e10bc884
5 changed files with 19 additions and 13 deletions
  1. +3
    -0
      .stestr.conf
  2. +0
    -8
      .testr.conf
  3. +1
    -1
      lower-constraints.txt
  4. +1
    -1
      test-requirements.txt
  5. +14
    -3
      tox.ini

+ 3
- 0
.stestr.conf View File

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

+ 0
- 8
.testr.conf View File

@ -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:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./octaviaclient/tests/unit} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

+ 1
- 1
lower-constraints.txt View File

@ -66,7 +66,7 @@ rfc3986==0.3.1
simplejson==3.5.1
six==1.10.0
stevedore==1.20.0
testrepository==0.0.18
stestr==2.0.0
testscenarios==0.4
testtools==2.2.0
traceback2==1.4.0


+ 1
- 1
test-requirements.txt View File

@ -8,5 +8,5 @@ coverage!=4.4,>=4.0 # Apache-2.0
mock>=2.0.0 # BSD
python-subunit>=1.0.0 # Apache-2.0/BSD
oslotest>=3.2.0 # Apache-2.0
testrepository>=0.0.18 # Apache-2.0/BSD
stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD

+ 14
- 3
tox.ini View File

@ -17,8 +17,8 @@ deps =
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
rm -Rf .testrepository/times.dbm
python setup.py test --slowest --testr-args='{posargs}'
stestr run {posargs}
stestr slowest
[testenv:pep8]
commands = flake8 {posargs}
@ -27,7 +27,18 @@ commands = flake8 {posargs}
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
setenv =
{[testenv]setenv}
PYTHON=coverage run --source octaviaclient --parallel-mode
whitelist_externals =
find
commands =
find octaviaclient -type f -name "*.pyc" -delete
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
deps =


Loading…
Cancel
Save