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: Ia64e4e4e44bc8ce7a86b471b0e60599fb285699f
Eric Fried 9 months ago
parent
commit
db1ba203cc
5 changed files with 15 additions and 11 deletions
  1. 2
    2
      .gitignore
  2. 3
    0
      .stestr.conf
  3. 0
    7
      .testr.conf
  4. 1
    0
      test-requirements.txt
  5. 9
    2
      tox.ini

+ 2
- 2
.gitignore View File

@@ -27,7 +27,7 @@ cover/
27 27
 !.coveragerc
28 28
 .tox
29 29
 nosetests.xml
30
-.testrepository
30
+.stestr/
31 31
 .venv
32 32
 
33 33
 # Translations
@@ -55,4 +55,4 @@ ChangeLog
55 55
 .*sw?
56 56
 
57 57
 # Files created by releasenotes build
58
-releasenotes/build
58
+releasenotes/build

+ 3
- 0
.stestr.conf View File

@@ -0,0 +1,3 @@
1
+[DEFAULT]
2
+test_path=${OS_TEST_PATH:-./os_service_types/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

+ 1
- 0
test-requirements.txt View File

@@ -7,6 +7,7 @@ hacking<0.13,>=0.12.0 # Apache-2.0
7 7
 coverage!=4.4,>=4.0 # Apache-2.0
8 8
 python-subunit>=1.0.0 # Apache-2.0/BSD
9 9
 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
10
+stestr>=2.0.0 # Apache-2.0
10 11
 oslotest>=3.2.0 # Apache-2.0
11 12
 testscenarios>=0.4 # Apache-2.0/BSD
12 13
 requests-mock>=1.2.0 # Apache-2.0

+ 9
- 2
tox.ini View File

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

Loading…
Cancel
Save