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 5 years ago
parent
commit
e541da94aa
No known key found for this signature in database
GPG Key ID: 290F53EDC899BF89
  1. 1
      .gitignore
  2. 3
      .stestr.conf
  3. 7
      .testr.conf
  4. 2
      test-requirements.txt
  5. 15
      tox.ini

1
.gitignore vendored

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

3
.stestr.conf

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

7
.testr.conf

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

2
test-requirements.txt

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

15
tox.ini

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