Browse Source

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: I06d7b72fcaa4ce1f8764fd51635ae8239ea649b2
Vu Cong Tuan 9 months ago
parent
commit
58ecafb104
6 changed files with 14 additions and 12 deletions
  1. 1
    2
      .gitignore
  2. 3
    0
      .stestr.conf
  3. 0
    7
      .testr.conf
  4. 1
    1
      lower-constraints.txt
  5. 1
    0
      test-requirements.txt
  6. 8
    2
      tox.ini

+ 1
- 2
.gitignore View File

@@ -25,8 +25,7 @@ pip-log.txt
25 25
 # Unit test / coverage reports
26 26
 .coverage
27 27
 .tox
28
-nosetests.xml
29
-.testrepository
28
+.stestr/
30 29
 
31 30
 # Translations
32 31
 *.mo

+ 3
- 0
.stestr.conf View File

@@ -0,0 +1,3 @@
1
+[DEFAULT]
2
+test_path=./oslo_privsep/tests
3
+top_path=./

+ 0
- 7
.testr.conf View File

@@ -1,7 +0,0 @@
1
-[DEFAULT]
2
-test_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 ./ ./oslo_privsep $LISTOPT $IDOPTION
6
-test_id_option=--load-list $IDFILE
7
-test_list_option=--list

+ 1
- 1
lower-constraints.txt View File

@@ -59,8 +59,8 @@ smmap==0.9.0
59 59
 snowballstemmer==1.2.1
60 60
 Sphinx==1.6.2
61 61
 sphinxcontrib-websupport==1.0.1
62
+stestr==2.0.0
62 63
 stevedore==1.20.0
63
-testrepository==0.0.18
64 64
 testtools==2.2.0
65 65
 traceback2==1.4.0
66 66
 unittest2==1.1.0

+ 1
- 0
test-requirements.txt View File

@@ -6,6 +6,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
6 6
 oslotest>=3.2.0 # Apache-2.0
7 7
 mock>=2.0.0 # BSD
8 8
 fixtures>=3.0.0 # Apache-2.0/BSD
9
+stestr>=2.0.0 # Apache-2.0
9 10
 
10 11
 # These are needed for docs generation
11 12
 openstackdocstheme>=1.18.1 # Apache-2.0

+ 8
- 2
tox.ini View File

@@ -10,7 +10,7 @@ deps =
10 10
   -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
11 11
   -r{toxinidir}/test-requirements.txt
12 12
   -r{toxinidir}/requirements.txt
13
-commands = python setup.py testr --slowest --testr-args='{posargs}'
13
+commands = stestr run --slowest {posargs}
14 14
 
15 15
 [testenv:py27]
16 16
 basepython = python2.7
@@ -34,7 +34,13 @@ commands = python setup.py build_sphinx
34 34
 
35 35
 [testenv:cover]
36 36
 basepython = python3
37
-commands = python setup.py testr --coverage --testr-args='{posargs}'
37
+setenv =
38
+    PYTHON=coverage run --source $project --parallel-mode
39
+commands =
40
+    stestr run '{posargs}'
41
+    coverage combine
42
+    coverage html -d cover
43
+    coverage xml -o cover/coverage.xml
38 44
 
39 45
 [flake8]
40 46
 # E123, E125 skipped as they are invalid PEP-8.

Loading…
Cancel
Save