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: I74706b3551bf0a9a56deca090d744d3156a34aa8
Vu Cong Tuan 9 months ago
parent
commit
ac1e5304d7
6 changed files with 17 additions and 16 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. 10
    5
      tox.ini

+ 1
- 2
.gitignore View File

@@ -24,8 +24,7 @@ pip-log.txt
24 24
 .coverage
25 25
 cover
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=./futurist/tests
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

@@ -45,7 +45,7 @@ snowballstemmer==1.2.1
45 45
 Sphinx==1.6.2
46 46
 sphinxcontrib-websupport==1.0.1
47 47
 stevedore==1.20.0
48
-testrepository==0.0.18
48
+stestr==2.0.0
49 49
 testscenarios==0.4
50 50
 testtools==2.2.0
51 51
 traceback2==1.4.0

+ 1
- 1
test-requirements.txt View File

@@ -11,6 +11,6 @@ doc8>=0.6.0 # Apache-2.0
11 11
 coverage!=4.4,>=4.0 # Apache-2.0
12 12
 python-subunit>=1.0.0 # Apache-2.0/BSD
13 13
 oslotest>=3.2.0 # Apache-2.0
14
-testrepository>=0.0.18 # Apache-2.0/BSD
14
+stestr>=2.0.0 # Apache-2.0
15 15
 testscenarios>=0.4 # Apache-2.0/BSD
16 16
 testtools>=2.2.0 # MIT

+ 10
- 5
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
 [testenv:pep8]
17 17
 basepython = python3
@@ -25,11 +25,16 @@ commands = {posargs}
25 25
 
26 26
 [testenv:cover]
27 27
 basepython = python3
28
+setenv =
29
+    PYTHON=coverage run --source $project --parallel-mode
28 30
 commands =
29
-  coverage erase
30
-  find . -type f -name "*.pyc" -delete
31
-  python setup.py test --coverage --testr-args='{posargs}'
32
-  coverage report
31
+    coverage erase
32
+    find . -type f -name "*.pyc" -delete
33
+    stestr run '{posargs}'
34
+    coverage combine
35
+    coverage html -d cover
36
+    coverage xml -o cover/coverage.xml
37
+    coverage report
33 38
 
34 39
 [testenv:py27]
35 40
 basepython = python2.7

Loading…
Cancel
Save