Browse Source

Merge "Switch to stestr"

Zuul 8 months ago
parent
commit
8763b70935
5 changed files with 13 additions and 9 deletions
  1. 1
    2
      .gitignore
  2. 4
    0
      .stestr.conf
  3. 0
    4
      .testr.conf
  4. 1
    1
      test-requirements.txt
  5. 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_collect_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
test-requirements.txt View File

@@ -8,6 +8,6 @@ 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 10
 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
11
-testrepository>=0.0.18 # Apache-2.0/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
@@ -22,8 +22,13 @@ commands = flake8
22 22
 
23 23
 [testenv:cover]
24 24
 basepython = python3
25
+setenv =
26
+    PYTHON=coverage run --source os_collect_config --parallel-mode
25 27
 commands =
26
-  python setup.py test --coverage --coverage-package-name=os_collect_config
28
+    stestr run '{posargs}'
29
+    coverage combine
30
+    coverage html -d cover
31
+    coverage xml -o cover/coverage.xml
27 32
 
28 33
 [testenv:venv]
29 34
 basepython = python3

Loading…
Cancel
Save