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 it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Idd7629f2a051aadaf53b04a1b331b20d7fa690de
changes/26/570426/4
Slawek Kaplonski 1 year ago
parent
commit
c886130f15
5 changed files with 12 additions and 8 deletions
  1. 2
    1
      .gitignore
  2. 3
    0
      .stestr.conf
  3. 0
    4
      .testr.conf
  4. 1
    1
      requirements.txt
  5. 6
    2
      tox.ini

+ 2
- 1
.gitignore View File

@@ -7,6 +7,7 @@ build
7 7
 *.swp
8 8
 *.swo
9 9
 *.pyc
10
-.testrepository
11 10
 .idea/*
12 11
 *~
12
+!/.stestr.conf
13
+.stestr/

+ 3
- 0
.stestr.conf View File

@@ -0,0 +1,3 @@
1
+[DEFAULT]
2
+test_path=${OS_TEST_PATH:-./tests/}
3
+top_dir=./

+ 0
- 4
.testr.conf View File

@@ -1,4 +0,0 @@
1
-[DEFAULT]
2
-test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
3
-test_id_option=--load-list $IDFILE
4
-test_list_option=--list

+ 1
- 1
requirements.txt View File

@@ -3,5 +3,5 @@
3 3
 # integrated gate. Any sync must happen manually as recommended by
4 4
 # the openstack release team.
5 5
 pbr>=2.0.0,!=2.1.0 # Apache-2.0
6
-testrepository>=0.0.18 # Apache-2.0/BSD
6
+stestr>=1.0.0 # Apache-2.0
7 7
 testtools>=1.4.0 # MIT

+ 6
- 2
tox.ini View File

@@ -5,14 +5,18 @@ skipsdist = True
5 5
 
6 6
 [testenv]
7 7
 usedevelop = True
8
-setenv = VIRTUAL_ENV={envdir}
8
+setenv =
9
+  VIRTUAL_ENV={envdir}
10
+  OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
11
+  OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
12
+  OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
9 13
 install_command = pip install -U {opts} {packages}
10 14
 # Unit test requires docutils and it is recommended to install docutils via
11 15
 # sphinx. We use doc/requirements.txt as well to avoid duplicated entries.
12 16
 deps =
13 17
   -r{toxinidir}/requirements.txt
14 18
   -r{toxinidir}/doc/requirements.txt
15
-commands = python setup.py testr --slowest --testr-args='{posargs}'
19
+commands = stestr run --slowest {posargs}
16 20
 
17 21
 [testenv:venv]
18 22
 commands = {posargs}

Loading…
Cancel
Save