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

+ 3
- 0
.stestr.conf View File

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

+ 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

+ 2
- 1
lower-constraints.txt View File

@@ -8,6 +8,7 @@ dulwich==0.15.0
8 8
 extras==1.0.0
9 9
 fixtures==3.0.0
10 10
 flake8==2.2.4
11
+funcsigs==1.0.0
11 12
 hacking==0.10.3
12 13
 imagesize==0.7.1
13 14
 Jinja2==2.10
@@ -31,7 +32,7 @@ snowballstemmer==1.2.1
31 32
 Sphinx==1.6.5
32 33
 sphinxcontrib-websupport==1.0.1
33 34
 stevedore==1.20.0
34
-testrepository==0.0.18
35
+stestr==2.0.0
35 36
 testtools==2.2.0
36 37
 traceback2==1.4.0
37 38
 unittest2==1.1.0

+ 2
- 2
test-requirements.txt View File

@@ -6,9 +6,9 @@ hacking<0.11,>=0.10.0
6 6
 
7 7
 coverage!=4.4,>=4.0 # Apache-2.0
8 8
 python-subunit>=1.0.0 # Apache-2.0/BSD
9
-sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
9
+sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
10 10
 openstackdocstheme>=1.18.1 # Apache-2.0
11
-testrepository>=0.0.18 # Apache-2.0/BSD
11
+stestr>=2.0.0 # Apache-2.0
12 12
 testtools>=2.2.0 # MIT
13 13
 fixtures>=3.0.0 # Apache-2.0/BSD
14 14
 doc8>=0.6.0 # Apache-2.0

+ 9
- 3
tox.ini View File

@@ -12,7 +12,7 @@ deps =
12 12
  -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
13 13
  -r{toxinidir}/test-requirements.txt
14 14
  -r{toxinidir}/requirements.txt
15
-commands = python setup.py testr --slowest --testr-args='{posargs}'
15
+commands = stestr run --slowest {posargs}
16 16
 
17 17
 [testenv:debug]
18 18
 basepython = python3
@@ -32,7 +32,13 @@ commands = {posargs}
32 32
 
33 33
 [testenv:cover]
34 34
 basepython = python3
35
-commands = python setup.py testr --coverage --testr-args='{posargs}'
35
+setenv =
36
+    PYTHON=coverage run --source $project --parallel-mode
37
+commands =
38
+    stestr run '{posargs}'
39
+    coverage combine
40
+    coverage html -d cover
41
+    coverage xml -o cover/coverage.xml
36 42
 
37 43
 [testenv:docs]
38 44
 basepython = python3
@@ -41,7 +47,7 @@ commands = python setup.py build_sphinx
41 47
 [testenv:py27]
42 48
 basepython = python2.7
43 49
 commands =
44
-    python setup.py testr --slowest --testr-args='{posargs}'
50
+    stestr run --slowest {posargs}
45 51
     sphinx-build -b doctest doc/source doc/build
46 52
     doc8 --ignore-path "doc/source/history.rst" doc/source
47 53
 

Loading…
Cancel
Save