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

+ 1
- 2
.gitignore View File

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

+ 4
- 0
.stestr.conf View File

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

+ 0
- 4
.testr.conf View File

@@ -1,4 +0,0 @@
1
-[DEFAULT]
2
-test_command=${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
3
-test_id_option=--load-list $IDFILE
4
-test_list_option=--list

+ 1
- 1
lower-constraints.txt View File

@@ -27,7 +27,7 @@ six==1.10.0
27 27
 snowballstemmer==1.2.1
28 28
 Sphinx==1.6.5
29 29
 sphinxcontrib-websupport==1.0.1
30
-testrepository==0.0.18
30
+stestr==2.0.0
31 31
 testscenarios==0.4
32 32
 testtools==2.2.0
33 33
 traceback2==1.4.0

+ 2
- 2
test-requirements.txt View File

@@ -7,7 +7,7 @@ coverage!=4.4,>=4.0 # Apache-2.0
7 7
 fixtures>=3.0.0 # Apache-2.0/BSD
8 8
 mock>=2.0.0 # BSD
9 9
 python-subunit>=1.0.0 # Apache-2.0/BSD
10
-sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
11
-testrepository>=0.0.18 # Apache-2.0/BSD
10
+sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
11
+stestr>=2.0.0 # Apache-2.0
12 12
 testscenarios>=0.4 # Apache-2.0/BSD
13 13
 testtools>=2.2.0 # MIT

+ 7
- 2
tox.ini View File

@@ -11,7 +11,7 @@ deps =
11 11
        -r{toxinidir}/requirements.txt
12 12
        -r{toxinidir}/test-requirements.txt
13 13
 commands =
14
-  python setup.py testr --slowest --testr-args='{posargs}'
14
+  stestr run --slowest {posargs}
15 15
 
16 16
 [tox:jenkins]
17 17
 sitepackages = True
@@ -20,8 +20,13 @@ sitepackages = True
20 20
 commands = flake8
21 21
 
22 22
 [testenv:cover]
23
+setenv =
24
+    PYTHON=coverage run --source os_apply_config --parallel-mode
23 25
 commands =
24
-  python setup.py test --coverage --coverage-package-name=os_apply_config
26
+    stestr run '{posargs}'
27
+    coverage combine
28
+    coverage html -d cover
29
+    coverage xml -o cover/coverage.xml
25 30
 
26 31
 [testenv:venv]
27 32
 commands = {posargs}

Loading…
Cancel
Save