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

+ 1
- 2
.gitignore View File

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

+ 4
- 0
.stestr.conf View File

@@ -0,0 +1,4 @@
1
+[DEFAULT]
2
+test_path=./networking_hyperv/tests/unit
3
+top_dir=./
4
+

+ 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 ./ . $LISTOPT $IDOPTION
6
-test_id_option=--load-list $IDFILE
7
-test_list_option=--list

+ 1
- 1
lower-constraints.txt View File

@@ -125,7 +125,7 @@ statsd==3.2.1
125 125
 stevedore==1.20.0
126 126
 Tempita==0.5.2
127 127
 tenacity==3.2.1
128
-testrepository==0.0.18
128
+stestr==2.0.0
129 129
 testscenarios==0.4
130 130
 testtools==2.2.0
131 131
 tinyrpc==0.6

+ 1
- 1
test-requirements.txt View File

@@ -12,7 +12,7 @@ docutils>=0.11 # OSI-Approved Open Source, Public Domain
12 12
 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
13 13
 oslo.config>=5.2.0 # Apache-2.0
14 14
 oslotest>=3.2.0 # Apache-2.0
15
-testrepository>=0.0.18 # Apache-2.0/BSD
15
+stestr>=2.0.0 # Apache-2.0
16 16
 testscenarios>=0.4 # Apache-2.0/BSD
17 17
 testtools>=2.2.0 # MIT
18 18
 openstackdocstheme>=1.18.1 # Apache-2.0

+ 8
- 2
tox.ini View File

@@ -13,7 +13,7 @@ deps = -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/re
13 13
        -r{toxinidir}/requirements.txt
14 14
        -r{toxinidir}/test-requirements.txt
15 15
 
16
-commands = python setup.py testr --slowest --testr-args='{posargs}'
16
+commands = stestr run --slowest {posargs}
17 17
 
18 18
 [testenv:pep8]
19 19
 basepython = python3
@@ -25,7 +25,13 @@ commands = {posargs}
25 25
 
26 26
 [testenv:cover]
27 27
 basepython = python3
28
-commands = python setup.py testr --coverage --testr-args='{posargs}'
28
+setenv =
29
+    PYTHON=coverage run --source networking_hyperv --parallel-mode
30
+commands =
31
+    stestr run '{posargs}'
32
+    coverage combine
33
+    coverage html -d cover
34
+    coverage xml -o cover/coverage.xml
29 35
 
30 36
 [testenv:docs]
31 37
 basepython = python3

Loading…
Cancel
Save