Merge "Deprecate ostestr command"

This commit is contained in:
Zuul 2019-06-18 13:44:34 +00:00 committed by Gerrit Code Review
commit bced00648a
11 changed files with 177 additions and 3 deletions

View File

@ -5,3 +5,4 @@
- openstack-python36-jobs
- openstack-python37-jobs
- publish-openstack-docs-pti
- release-notes-jobs-python3

View File

@ -20,9 +20,22 @@ A testr wrapper to provide functionality for OpenStack projects.
Features
--------
.. warning::
``ostestr`` command is deprecated. Use `stestr`_ command instead like
following
0. Install `stestr`_ (This step is already done if you're using ostestr.)
1. You can use ``stestr run ...`` instead of ``ostestr ...``
2. You can use ``stestr list ...`` instead of ``ostestr --list ...``
For more sub commands and options, please refer to `stestr help` or the
`stestr`_ document.
* ``ostestr``: a testr wrapper that uses subunit-trace for output and builds
some helpful extra functionality around testr
* ``subunit-trace``: an output filter for a subunit stream which provides
useful information about the run
* ``subunit2html``: generates a test results html page from a subunit stream
* ``generate-subunit``: generate a subunit stream for a single test
.. _stestr: https://stestr.readthedocs.io/

7
doc/requirements.txt Normal file
View File

@ -0,0 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
openstackdocstheme>=1.18.1 # Apache-2.0
reno>=2.5.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2,<2.0.0;python_version=='2.7' # BSD
sphinx!=1.6.6,!=1.6.7,>=1.6.2;python_version>='3.4' # BSD

View File

@ -3,6 +3,19 @@
ostestr
=======
.. warning::
``ostestr`` command is deprecated. Use `stestr`_ command instead like
following.
0. Install `stestr`_ (This step is already done if you're using ostestr.)
1. You can use ``stestr run ...`` instead of ``ostestr ...``
2. You can use ``stestr list ...`` instead of `ostestr --list ...``
For more sub commands and options, please refer to `stestr help` or the
`stestr`_ document.
.. _stestr: https://stestr.readthedocs.io/
The ostestr command provides a wrapper around the testr command included in
the testrepository package. It's designed to build on the functionality
included in testr and workaround several UI bugs in the short term. By default

View File

@ -235,6 +235,10 @@ def _select_and_call_runner(opts, exclude_regex, others):
def ostestr(args):
msg = ('Deprecate: ostestr command is deprecated now. Use stestr '
'command instead. For more information: '
'https://docs.openstack.org/os-testr/latest/user/ostestr.html')
warnings.warn(msg)
opts, others = get_parser(args)
if opts.pretty and opts.subunit:
msg = ('Subunit output and pretty output cannot be specified at the '

View File

@ -0,0 +1,7 @@
---
deprecations:
- |
The ``ostestr`` command is now deprecated explicitly. We already switched
to use ``stestr`` command instead. And we haven't maintained this command
recently. For more information about stestr, see
https://stestr.readthedocs.io/en/latest/

View File

@ -0,0 +1,96 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
# -- Project information -----------------------------------------------------
project = 'ostestr Release Notes'
copyright = '2019, ostestr Developers'
author = 'ostestr Developers'
# -- General configuration ---------------------------------------------------
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'openstackdocstheme',
'reno.sphinxext',
]
# openstackdocstheme options
repository_name = 'openstack/os-testr'
bug_project = 'os-testr'
bug_tag = ''
# Must set this variable to include year, month, day, hours, and minutes.
html_last_updated_fmt = '%Y-%m-%d %H:%M'
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
# source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# Release do not need a version number in the title, they
# cover multiple versions.
# The full version, including alpha/beta/rc tags.
release = ''
# The short X.Y version.
version = ''
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# -- Options for HTML output -------------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'openstackdocs'
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# Output file base name for HTML help builder.
htmlhelp_basename = 'ostestrReleaseNotesdoc'

View File

@ -0,0 +1,14 @@
======================
os-testr Release Notes
======================
.. toctree::
:maxdepth: 1
unreleased
Indices and tables
==================
* :ref:`genindex`
* :ref:`search`

View File

@ -0,0 +1,5 @@
============================
Current Series Release Notes
============================
.. release-notes::

View File

@ -5,8 +5,6 @@
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
openstackdocstheme>=1.18.1 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
ddt>=1.0.1 # MIT

18
tox.ini
View File

@ -13,7 +13,7 @@ setenv =
OS_TEST_TIMEOUT=500
whitelist_externals = find
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
@ -41,12 +41,28 @@ commands =
[testenv:docs]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands = python setup.py build_sphinx
[testenv:debug]
basepython = python3
commands = oslo_debug_helper {posargs}
[testenv:releasenotes]
basepython = python3
deps =
-c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
-r{toxinidir}/requirements.txt
-r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees \
-b html releasenotes/source releasenotes/build/html
whitelist_externals = rm
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# H405 skipped as it wrongly recognizes a multiline string as docstring