summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.stestr.conf3
-rw-r--r--lower-constraints.txt1
-rw-r--r--test-requirements.txt1
-rw-r--r--tox.ini14
5 files changed, 17 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 2b99db0..a99df11 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,7 @@ doc/source/api/
dist/
.testrepository/
/doc/source/sample.config
+.stestr/
# Files created by releasenotes build
releasenotes/build
diff --git a/.stestr.conf b/.stestr.conf
new file mode 100644
index 0000000..7923822
--- /dev/null
+++ b/.stestr.conf
@@ -0,0 +1,3 @@
+[DEFAULT]
+test_path=.
+top_dir=./
diff --git a/lower-constraints.txt b/lower-constraints.txt
index ad6177e..678b225 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -46,6 +46,7 @@ smmap==0.9.0
snowballstemmer==1.2.1
Sphinx==1.6.2
sphinxcontrib-websupport==1.0.1
+stestr==2.0.0
stevedore==1.20.0
testrepository==0.0.18
testscenarios==0.4
diff --git a/test-requirements.txt b/test-requirements.txt
index feacdb2..8aa4ba6 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -6,6 +6,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
testrepository>=0.0.18 # Apache-2.0/BSD
testscenarios>=0.4 # Apache-2.0/BSD
+stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
oslotest>=3.2.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index 0f650ea..6d0332d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,13 +5,17 @@ envlist = py35,py27,pep8
[testenv]
install_command = pip install {opts} {packages}
+setenv = OS_STDOUT_CAPTURE=1
+ OS_STDERR_CAPTURE=1
+ OS_TEST_TIMEOUT=60
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
commands =
- python setup.py test --coverage --coverage-package-name=oslo_config --slowest --testr-args='{posargs}'
- coverage report --show-missing
+ find . -type f -name "*.pyc" -delete
+ stestr run {posargs}
+ stestr slowest
[testenv:lower-constraints]
basepython = python3
@@ -33,7 +37,11 @@ commands =
[testenv:cover]
basepython = python3
commands =
- python setup.py test --coverage --coverage-package-name=oslo_config --testr-args='{posargs}'
+ coverage erase
+ {[testenv]commands}
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
coverage report --show-missing
[testenv:venv]