Switch to stestr in README.rst and the method name

This commit switches to stestr in README.rst and the method name. We
already switched to use stestr instead of testr/ostestr. However,
a few are still remaining in README.rst and the unit test name. This
patch leaves some `testr` things because they are for the 'legacy run
method'. So, we don't need to remove them completely.

Change-Id: I0e8e19e2150d6e0ce9a299a10bdd51652d86497e
This commit is contained in:
Masayuki Igawa 2018-03-09 16:20:42 +09:00 committed by Felipe Monteiro
parent de5f0da10e
commit ac0b171b73
3 changed files with 11 additions and 6 deletions

View File

@ -109,15 +109,18 @@ as it is simpler, and quicker to work with.
$ tempest run --workspace cloud-01
There is also the option to use testr directly, or any `testr`_ based test
runner, like `ostestr`_. For example, from the workspace dir run::
There is also the option to use `stestr`_ directly. For example, from
the workspace dir run::
$ ostestr --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))'
$ stestr run --black-regex '\[.*\bslow\b.*\]' '^tempest\.(api|scenario)'
will run the same set of tests as the default gate jobs.
will run the same set of tests as the default gate jobs. Or you can
use `unittest`_ compatible test runners such as `testr`_, `pytest`_ etc.
.. _unittest: https://docs.python.org/3/library/unittest.html
.. _testr: https://testrepository.readthedocs.org/en/latest/MANUAL.html
.. _ostestr: https://docs.openstack.org/os-testr/latest/
.. _stestr: https://stestr.readthedocs.org/en/latest/MANUAL.html
.. _pytest: https://docs.pytest.org/en/latest/
Library
-------

View File

@ -22,7 +22,7 @@ from tempest.tests import base
class TestTempestInit(base.TestCase):
def test_generate_testr_conf(self):
def test_generate_stestr_conf(self):
# Create fake conf dir
conf_dir = self.useFixture(fixtures.TempDir())

View File

@ -78,6 +78,7 @@ setenv = {[tempestenv]setenv}
deps = {[tempestenv]deps}
# The regex below is used to select which tests to run and exclude the slow tag:
# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
# FIXME: We can replace it with the `--black-regex` option to exclude tests now.
commands =
find . -type f -name "*.pyc" -delete
tempest run --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.api)' {posargs}
@ -100,6 +101,7 @@ setenv = {[tempestenv]setenv}
deps = {[tempestenv]deps}
# The regex below is used to select which tests to run and exclude the slow tag:
# See the testrepository bug: https://bugs.launchpad.net/testrepository/+bug/1208610
# FIXME: We can replace it with the `--black-regex` option to exclude tests now.
commands =
find . -type f -name "*.pyc" -delete
tempest run --serial --regex '(?!.*\[.*\bslow\b.*\])(^tempest\.(api|scenario))' {posargs}