Browse Source

Switch to use stestr instead of os-testr

This commit switches to use stestr instead of os-testr. It should be
better to reduce the test runner complexity.

Change-Id: Ia16ad5ed6d9ed7be9dc6902f875b0144b24a938a
changes/98/528198/2
Masayuki Igawa 4 years ago
parent
commit
e541da94aa
No known key found for this signature in database GPG Key ID: 290F53EDC899BF89
5 changed files with 18 additions and 10 deletions
  1. +1
    -0
      .gitignore
  2. +3
    -0
      .stestr.conf
  3. +0
    -7
      .testr.conf
  4. +1
    -1
      test-requirements.txt
  5. +13
    -2
      tox.ini

+ 1
- 0
.gitignore View File

@ -30,6 +30,7 @@ cover/
.tox
nosetests.xml
.testrepository
.stestr
.venv
# Translations


+ 3
- 0
.stestr.conf View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=coverage2sql/tests
top_dir=./

+ 0
- 7
.testr.conf View File

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

+ 1
- 1
test-requirements.txt View File

@ -14,7 +14,7 @@ testscenarios>=0.4 # Apache-2.0/BSD
testtools>=1.4.0 # MIT
PyMySQL>=0.7.6 # MIT License
psycopg2>=2.5 # LGPL/ZPL
os-testr>=0.8.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
reno>=1.8.0 # Apache-2.0
oslo.concurrency>=3.8.0 # Apache-2.0
six>=1.9.0 # MIT


+ 13
- 2
tox.ini View File

@ -12,7 +12,7 @@ deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
find . -type f -name "*.pyc" -delete
ostestr {posargs}
stestr run {posargs}
[testenv:pep8]
sitepackages = False
@ -23,7 +23,18 @@ commands =
commands = {posargs}
[testenv:cover]
commands = python setup.py test --coverage --testr-args='{posargs}'
setenv =
{[testenv]setenv}
PYTHON=coverage run --source coverage2sql --parallel-mode
commands =
coverage erase
find . -type f -name "*.pyc" -delete
stestr --test-path ./coverage2sql/tests run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[testenv:docs]
commands = python setup.py build_sphinx


Loading…
Cancel
Save