Browse Source

Convert oslo.service to using stestr

With the upgrade to oslotest 3.6.0 [0], testr no longer works [1].
This is because oslotest no longer requires testr and we don't depend
on it directly in oslo.service. Let's switch to using stestr, too!
Everyone's doing it...
This patch follows [2] in oslo.policy

[0] d5a3c58f71
[1] 897823fbd6
[2] https://review.openstack.org/#/c/579295/

Change-Id: Ia82a17fe26b41730c8c323819591523d66a8cb36
Vu Cong Tuan 9 months ago
parent
commit
ebad161c89
6 changed files with 8 additions and 12 deletions
  1. 1
    2
      .gitignore
  2. 3
    0
      .stestr.conf
  3. 0
    7
      .testr.conf
  4. 1
    1
      lower-constraints.txt
  5. 2
    1
      test-requirements.txt
  6. 1
    1
      tox.ini

+ 1
- 2
.gitignore View File

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

+ 3
- 0
.stestr.conf View File

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

+ 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 ./ ./oslo_service $LISTOPT $IDOPTION
6
-test_id_option=--load-list $IDFILE
7
-test_list_option=--list

+ 1
- 1
lower-constraints.txt View File

@@ -65,8 +65,8 @@ smmap==0.9.0
65 65
 snowballstemmer==1.2.1
66 66
 Sphinx==1.6.2
67 67
 sphinxcontrib-websupport==1.0.1
68
+stestr==2.0.0
68 69
 stevedore==1.20.0
69
-testrepository==0.0.18
70 70
 testtools==2.2.0
71 71
 traceback2==1.4.0
72 72
 unittest2==1.1.0

+ 2
- 1
test-requirements.txt View File

@@ -6,7 +6,8 @@ fixtures>=3.0.0 # Apache-2.0/BSD
6 6
 hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
7 7
 mock>=2.0.0 # BSD
8 8
 oslotest>=3.2.0 # Apache-2.0
9
-requests
9
+requests>=2.14.2 # Apache-2.0
10
+stestr>=2.0.0 # Apache-2.0
10 11
 
11 12
 # These are needed for docs generation/testing
12 13
 openstackdocstheme>=1.18.1 # Apache-2.0

+ 1
- 1
tox.ini View File

@@ -15,7 +15,7 @@ deps =
15 15
 whitelist_externals = find
16 16
 commands =
17 17
     find . -type f -name "*.py[co]" -delete
18
-    python setup.py testr --slowest --testr-args='{posargs}'
18
+    stestr run --slowest {posargs}
19 19
 
20 20
 [testenv:pep8]
21 21
 basepython = python3

Loading…
Cancel
Save