summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVu Cong Tuan <tuanvc@vn.fujitsu.com>2018-07-03 13:32:27 +0700
committerVu Cong Tuan <tuanvc@vn.fujitsu.com>2018-07-03 16:00:44 +0700
commitde7e0f0df2acf2e2827d98387417dc0c2ea263aa (patch)
tree985ccd403367e7925faa0461c8aef27266f7e033
parent99f6383e97f59c110211bdbc60894befc3fdc4e9 (diff)
downloadoslo-rootwrap-de7e0f0df2acf2e2827d98387417dc0c2ea263aa.tar.gz
Switch to stestr
According to Openstack summit session [1], stestr is maintained project to which all Openstack projects should migrate. Let's switch to stestr as other projects have already moved to it. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: Ibee9bd5c371f6f94131cccf093ec2100e258f411
-rw-r--r--.gitignore2
-rw-r--r--.stestr.conf3
-rw-r--r--.testr.conf4
-rw-r--r--lower-constraints.txt2
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini12
6 files changed, 14 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 22bfe61..7c17993 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,7 +12,7 @@ build/
doc/build/
doc/source/api/
dist/
-.testrepository/
+.stestr/
.project
.pydevproject
diff --git a/.stestr.conf b/.stestr.conf
new file mode 100644
index 0000000..e3008bc
--- /dev/null
+++ b/.stestr.conf
@@ -0,0 +1,3 @@
+[DEFAULT]
+test_path=./oslo_rootwrap/tests
+top_path=./
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 1641f86..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,4 +0,0 @@
-[DEFAULT]
-test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 9a1bfdb..32d7eaf 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -40,8 +40,8 @@ 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
testtools==2.2.0
traceback2==1.4.0
unittest2==1.1.0
diff --git a/test-requirements.txt b/test-requirements.txt
index 08248d0..ed60fb1 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -5,8 +5,8 @@
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
testtools>=2.2.0 # MIT
+stestr>=2.0.0 # Apache-2.0
# this is required for the docs build jobs
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
diff --git a/tox.ini b/tox.ini
index 97fbdd0..24d69ab 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,8 +12,8 @@ deps =
# run in a separate process
whitelist_externals = env
commands =
- python setup.py testr --slowest --testr-args='(?!tests.test_functional_eventlet)tests {posargs}'
- env TEST_EVENTLET=1 python setup.py testr --slowest --testr-args='tests.test_functional_eventlet'
+ stestr run --slowest (?!tests.test_functional_eventlet)tests {posargs}
+ env TEST_EVENTLET=1 stestr run --slowest tests.test_functional_eventlet
[testenv:py27]
basepython = python2.7
@@ -31,9 +31,13 @@ commands =
basepython = python3
deps = {[testenv]deps}
coverage
+setenv =
+ PYTHON=coverage run --source $project --parallel-mode
commands =
- python setup.py testr --coverage
-
+ stestr run '{posargs}'
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
[testenv:venv]
basepython = python3