summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasayuki Igawa <masayuki@igawa.io>2017-12-15 17:19:38 +0900
committerMasayuki Igawa <masayuki@igawa.io>2017-12-16 17:45:42 +0900
commite541da94aabbe47f80ab55f9fcbb0c6ef9027fe2 (patch)
treefca35658569a672298c277dbb30d57cdd2d3516b
parent53901fb23d9055d2216b8e73c751cb913ff3a03c (diff)
Switch to use stestr instead of os-testr
This commit switches to use stestr instead of os-testr. It should be better to reduce the test runner complexity. Change-Id: Ia16ad5ed6d9ed7be9dc6902f875b0144b24a938a
Notes
Notes (review): Code-Review+2: Masayuki Igawa <masayuki@igawa.io> Workflow+1: Masayuki Igawa <masayuki@igawa.io> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Sat, 16 Dec 2017 09:00:38 +0000 Reviewed-on: https://review.openstack.org/528198 Project: openstack/coverage2sql Branch: refs/heads/master
-rw-r--r--.gitignore1
-rw-r--r--.stestr.conf3
-rw-r--r--.testr.conf7
-rw-r--r--test-requirements.txt2
-rw-r--r--tox.ini15
5 files changed, 18 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index c934954..91e6d03 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,6 +30,7 @@ cover/
30.tox 30.tox
31nosetests.xml 31nosetests.xml
32.testrepository 32.testrepository
33.stestr
33.venv 34.venv
34 35
35# Translations 36# Translations
diff --git a/.stestr.conf b/.stestr.conf
new file mode 100644
index 0000000..f3ad79e
--- /dev/null
+++ b/.stestr.conf
@@ -0,0 +1,3 @@
1[DEFAULT]
2test_path=coverage2sql/tests
3top_dir=./
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index 6d83b3c..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,7 +0,0 @@
1[DEFAULT]
2test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
3 OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
4 OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
5 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
6test_id_option=--load-list $IDFILE
7test_list_option=--list
diff --git a/test-requirements.txt b/test-requirements.txt
index c080d24..9afd64a 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -14,7 +14,7 @@ testscenarios>=0.4 # Apache-2.0/BSD
14testtools>=1.4.0 # MIT 14testtools>=1.4.0 # MIT
15PyMySQL>=0.7.6 # MIT License 15PyMySQL>=0.7.6 # MIT License
16psycopg2>=2.5 # LGPL/ZPL 16psycopg2>=2.5 # LGPL/ZPL
17os-testr>=0.8.0 # Apache-2.0 17stestr>=1.0.0 # Apache-2.0
18reno>=1.8.0 # Apache-2.0 18reno>=1.8.0 # Apache-2.0
19oslo.concurrency>=3.8.0 # Apache-2.0 19oslo.concurrency>=3.8.0 # Apache-2.0
20six>=1.9.0 # MIT 20six>=1.9.0 # MIT
diff --git a/tox.ini b/tox.ini
index dcae417..f0ab231 100644
--- a/tox.ini
+++ b/tox.ini
@@ -12,7 +12,7 @@ deps = -r{toxinidir}/requirements.txt
12 -r{toxinidir}/test-requirements.txt 12 -r{toxinidir}/test-requirements.txt
13commands = 13commands =
14 find . -type f -name "*.pyc" -delete 14 find . -type f -name "*.pyc" -delete
15 ostestr {posargs} 15 stestr run {posargs}
16 16
17[testenv:pep8] 17[testenv:pep8]
18sitepackages = False 18sitepackages = False
@@ -23,7 +23,18 @@ commands =
23commands = {posargs} 23commands = {posargs}
24 24
25[testenv:cover] 25[testenv:cover]
26commands = python setup.py test --coverage --testr-args='{posargs}' 26setenv =
27 {[testenv]setenv}
28 PYTHON=coverage run --source coverage2sql --parallel-mode
29commands =
30 coverage erase
31 find . -type f -name "*.pyc" -delete
32 stestr --test-path ./coverage2sql/tests run {posargs}
33 coverage combine
34 coverage html -d cover
35 coverage xml -o cover/coverage.xml
36 coverage report
37
27 38
28[testenv:docs] 39[testenv:docs]
29commands = python setup.py build_sphinx 40commands = python setup.py build_sphinx