summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-08-21 21:11:25 +0000
committerGerrit Code Review <review@openstack.org>2018-08-21 21:11:25 +0000
commit346156d1903df80bbcf4c8e5a9ac9c7baa84e049 (patch)
tree1359f58fe89241fe8466064f9bd575c7703d3517
parente6c0926769823402b2e70034d773941198b3827c (diff)
parentf6069e9e42bf0ab4d63908c4e81dd59799f167a5 (diff)
downloadoslo-log-346156d1903df80bbcf4c8e5a9ac9c7baa84e049.tar.gz
Merge "Migrate to stestr"
-rw-r--r--.gitignore3
-rw-r--r--.stestr.conf3
-rw-r--r--.testr.conf7
-rw-r--r--lower-constraints.txt1
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini14
6 files changed, 16 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index f6d6848..131bdf6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,8 +25,7 @@ pip-log.txt
.coverage*
cover
.tox
-nosetests.xml
-.testrepository
+.stestr
# Translations
*.mo
diff --git a/.stestr.conf b/.stestr.conf
new file mode 100644
index 0000000..1fbbb87
--- /dev/null
+++ b/.stestr.conf
@@ -0,0 +1,3 @@
+[DEFAULT]
+test_path=./oslo_log/tests/unit
+top_dir=./
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 0edde41..0000000
--- a/.testr.conf
+++ /dev/null
@@ -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 ./ ./oslo_log $LISTOPT $IDOPTION
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff --git a/lower-constraints.txt b/lower-constraints.txt
index c272ada..c6cbe34 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -59,6 +59,7 @@ smmap2==2.0.3
snowballstemmer==1.2.1
Sphinx==1.6.5
sphinxcontrib-websupport==1.0.1
+stestr==2.0.0
stevedore==1.28.0
systemd-python==234
testrepository==0.0.20
diff --git a/test-requirements.txt b/test-requirements.txt
index cc44b3b..3aead8d 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -4,7 +4,7 @@
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
-testrepository>=0.0.20 # Apache-2.0/BSD
+stestr>=2.0.0 # Apache-2.0
testtools>=2.3.0 # MIT
mock>=2.0.0 # BSD
oslotest>=3.3.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index 39f0726..c8f2e37 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,6 +3,8 @@ minversion = 2.0
envlist = py35,py27,pep8
[testenv]
+whitelist_externals =
+ find
setenv =
VIRTUAL_ENV={envdir}
BRANCH_NAME=master
@@ -11,8 +13,9 @@ install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:h
deps = -r{toxinidir}/test-requirements.txt
-e.[fixtures]
commands =
- python setup.py test --coverage --coverage-package-name=oslo_log --slowest --testr-args='{posargs}'
- coverage report --show-missing
+ find . -type f -name "*.pyc" -delete
+ stestr run {posargs}
+ stestr slowest
[testenv:pep8]
basepython = python3
@@ -36,7 +39,11 @@ commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasen
[testenv:cover]
basepython = python3
commands =
- python setup.py test --coverage --coverage-package-name=oslo_log --testr-args='{posargs}'
+ coverage erase
+ {[testenv]commands}
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
coverage report --show-missing
[testenv:bandit]
@@ -52,7 +59,6 @@ deps =
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
-
show-source = True
ignore = E123,E125,H405
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,__init__.py