Switch to using stestr
stestr is a fork of testrepository, designed specifically to concentrate on being a dedicated test runner. [1] The testrepository project is basically not active anymore and has several long standing bugs and useablility issues. stestr is still actively maintained and fixes a large number of those issues with testrepository. The best part is that stestr supports using subunit2sql as a repository backend. [1] https://github.com/mtreinish/stestr Change-Id: I39f5db8f77de027c18917215c761dca69d8cbea0
This commit is contained in:
parent
2626a1f7ae
commit
b99350137b
3
.stestr.conf
Normal file
3
.stestr.conf
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
test_path=./subunit2sql/tests
|
||||||
|
top_dir=./
|
@ -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:-500} \
|
|
||||||
OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \
|
|
||||||
${PYTHON:-python} -m subunit.run discover -t ./ ./subunit2sql/tests $LISTOPT $IDOPTION
|
|
||||||
test_id_option=--load-list $IDFILE
|
|
||||||
test_list_option=--list
|
|
@ -4,7 +4,7 @@ fixtures>=0.3.14
|
|||||||
mock>=1.0
|
mock>=1.0
|
||||||
sphinx>=1.6.2 # BSD
|
sphinx>=1.6.2 # BSD
|
||||||
testscenarios>=0.4
|
testscenarios>=0.4
|
||||||
testrepository>=0.0.18
|
stestr>=1.0.0
|
||||||
testtools>=0.9.34
|
testtools>=0.9.34
|
||||||
oslosphinx
|
oslosphinx
|
||||||
PyMySql
|
PyMySql
|
||||||
|
17
tox.ini
17
tox.ini
@ -6,13 +6,18 @@ skipsdist = True
|
|||||||
[testenv]
|
[testenv]
|
||||||
usedevelop = True
|
usedevelop = True
|
||||||
install_command = pip install -U --force-reinstall {opts} {packages}
|
install_command = pip install -U --force-reinstall {opts} {packages}
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv =
|
||||||
|
VIRTUAL_ENV={envdir}
|
||||||
|
OS_STDOUT_CAPTURE=1
|
||||||
|
OS_STDERR_CAPTURE=1
|
||||||
|
OS_TEST_TIMEOUT=500
|
||||||
whitelist_externals = find
|
whitelist_externals = find
|
||||||
deps = -r{toxinidir}/requirements.txt
|
deps = -r{toxinidir}/requirements.txt
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
commands =
|
commands =
|
||||||
find . -type f -name "*.pyc" -delete
|
find . -type f -name "*.pyc" -delete
|
||||||
ostestr {posargs}
|
stestr run {posargs}
|
||||||
|
stestr slowest
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
sitepackages = False
|
sitepackages = False
|
||||||
@ -20,9 +25,13 @@ commands =
|
|||||||
flake8 {posargs}
|
flake8 {posargs}
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv =
|
||||||
|
VIRTUAL_ENV={envdir}
|
||||||
|
PYTHON=coverage run --source subunit2sql --parallel-mode
|
||||||
commands =
|
commands =
|
||||||
python setup.py testr --coverage --testr-args='{posargs}'
|
stestr run {posargs}
|
||||||
|
coverage combine
|
||||||
|
coverage html -d cover
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
Loading…
Reference in New Issue
Block a user