Browse Source

Use ostestr to run unit test

The ostestr command provides a wrapper around the testr command.
By default it also has output that is much more useful for OpenStack’s
test including lists of all and failed tests and lists of the 10
slowest tests.
ref:
http://docs.openstack.org/developer/os-testr/ostestr.html

Change-Id: If005d1987b2a4e586cf35f0cc1d07739f84235d2
ting.wang 3 years ago
parent
commit
145fabe7dd
2 changed files with 2 additions and 1 deletions
  1. 1
    0
      test-requirements.txt
  2. 1
    1
      tox.ini

+ 1
- 0
test-requirements.txt View File

@@ -17,6 +17,7 @@ psycopg2>=2.5 # LGPL/ZPL
17 17
 python-subunit>=0.0.18 # Apache-2.0/BSD
18 18
 requests-mock>=0.7.0 # Apache-2.0
19 19
 sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 # BSD
20
+os-testr>=0.4.1 # Apache-2.0
20 21
 testrepository>=0.0.18 # Apache-2.0/BSD
21 22
 testresources>=0.2.4 # Apache-2.0/BSD
22 23
 testtools>=1.4.0 # MIT

+ 1
- 1
tox.ini View File

@@ -12,7 +12,7 @@ deps = -r{toxinidir}/requirements.txt
12 12
        -r{toxinidir}/test-requirements.txt
13 13
 commands =
14 14
   find . -type f -name "*.pyc" -delete
15
-  python setup.py testr --testr-args='{posargs}'
15
+  ostestr {posargs}
16 16
 
17 17
 [testenv:releasenotes]
18 18
 commands = sphinx-build -a -E -W -d releasenotes/build/doctrees \

Loading…
Cancel
Save