aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVu Cong Tuan <tuanvc@vn.fujitsu.com>2018-07-10 17:44:27 +0700
committerVu Cong Tuan <tuanvc@vn.fujitsu.com>2018-07-24 14:18:20 +0700
commit47d88430ce67e26a7c117c4949e58c974e552e7f (patch)
tree5d451ce2ab6dabd0ad11b8ada4c0af7538f8707f
parent53b2cdca2c545dc6749684091b03647e0fe06003 (diff)
downloadkolla-ansible-47d88430ce67e26a7c117c4949e58c974e552e7f.tar.gz
kolla-ansible-47d88430ce67e26a7c117c4949e58c974e552e7f.zip
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: I63079f352ff36dda4f3f64a8681431a319791f0e
-rw-r--r--.gitignore2
-rw-r--r--.stestr.conf4
-rw-r--r--.testr.conf7
-rw-r--r--lower-constraints.txt2
-rw-r--r--requirements.txt1
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini9
7 files changed, 15 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index c71843a19..679ab8f45 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,7 +24,7 @@ __pycache__/
*$py.class
# the files generated from tox command.
-.testrepository/
+.stestr/
AUTHORS
ChangeLog
doc/build
diff --git a/.stestr.conf b/.stestr.conf
new file mode 100644
index 000000000..dcdf16e8d
--- /dev/null
+++ b/.stestr.conf
@@ -0,0 +1,4 @@
+[DEFAULT]
+test_path=./tests
+top_dir=./
+
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 9c322599c..000000000
--- 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:-7200} \
- ${PYTHON:-python} -m subunit.run discover ${OS_TEST_PATH:-.} $LISTOPT $IDOPTION
-test_id_option=--load-list $IDFILE
-test_list_option=--list
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 271453829..9b3e74cd1 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -93,7 +93,7 @@ snowballstemmer==1.2.1
Sphinx==1.6.2
sphinxcontrib-websupport==1.0.1
stevedore==1.28.0
-testrepository==0.0.18
+stestr==2.0.0
testscenarios==0.4
testtools==2.2.0
traceback2==1.4.0
diff --git a/requirements.txt b/requirements.txt
index d7f806744..9866dffb0 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -11,3 +11,4 @@ setuptools!=24.0.0,!=34.0.0,!=34.0.1,!=34.0.2,!=34.0.3,!=34.1.0,!=34.1.1,!=34.2.
PyYAML>=3.12 # MIT
netaddr>=0.7.18 # BSD
cryptography>=2.1 # BSD/Apache-2.0
+stestr>=2.0.0 # Apache-2.0
diff --git a/test-requirements.txt b/test-requirements.txt
index 978266505..097f93897 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -16,6 +16,6 @@ python-ceilometerclient>=2.5.0 # Apache-2.0
python-neutronclient>=6.7.0 # Apache-2.0
python-openstackclient>=3.12.0 # Apache-2.0
pytz>=2013.6 # MIT
-testrepository>=0.0.18 # Apache-2.0/BSD
+stestr>=2.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
diff --git a/tox.ini b/tox.ini
index 731a5f4c1..b6e886ac1 100644
--- a/tox.ini
+++ b/tox.ini
@@ -17,7 +17,7 @@ passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
commands =
find . -type f -name "*.py[c|o]" -delete
find . -type d -name "__pycache__" -delete
- python setup.py test --slowest --testr-args='{posargs}'
+ stestr run --slowest {posargs}
[testenv:debug]
commands = oslo_debug_helper -t tests {posargs}
@@ -28,7 +28,12 @@ setenv = VIRTUAL_ENV={envdir}
NOSE_COVER_BRANCHES=1
NOSE_COVER_HTML=1
NOSE_COVER_HTML_DIR={toxinidir}/cover
-commands = python setup.py testr --coverage --testr-args='{posargs}'
+ PYTHON=coverage run --source kolla_ansible --parallel-mode
+commands =
+ stestr run '{posargs}'
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
[testenv:pep8]
# sphinx needs to be installed to make doc8 work properly