Update testing interface to reflect reality

Several things have changed since last the Project Testing Interface
was approved. It seems like a good idea to formally approve the current
state of the world before suggesting new changes.

Change-Id: Ic933a9dea945e5360d31773baef191fbd5bf436e
This commit is contained in:
Monty Taylor
2014-09-08 11:52:31 -07:00
parent 2e2ba5c64d
commit cde6c361f9

View File

@@ -44,41 +44,40 @@ Projects that are translated should also support:
Requirements Listing Requirements Listing
-------------------- --------------------
Each project should list its operations dependencies in tools/pip-requires Each project should list its operations dependencies in requirements.txt
and additional dependencies required for testing in tools/test-requires. and additional dependencies required for testing in test-requirements.txt.
If there are requirements that are specific to python3 or pypy support,
those may optionally be listed in requirements-py3.txt or
requirements-pypy.txt.
Virtual Environment Management Virtual Environment Management
------------------------------ ------------------------------
To support sensible testing across multiple python versions, we've use tox To support sensible testing across multiple python versions, we use tox
config files in the projects with the hope that eventually we can remove having config files in the projects.
install_venv.py copied in to each of the projects.
unittest running unittest running
---------------- ----------------
Nova uses a specialized test runner, which is a subclass of nose. Most of the OpenStack uses testrepository as its test runner, which supports a number
functionality of this has been extracted in to openstack.nose_plugin. There are of things, most importantly to the expanded project is the subunit output
still a few test failures currently when running nova unittests directly under stream collection. This is useful for aggregating and displaying test output.
nose, but once those are solved, the projects should really all have a config In support of that, the oslotest library is built on top of testtools,
for openstack.nose_plugin and then support running nose directly with no testscenarios and fixtures.
special setup ... this will help in writing code to exploit the features of
nose.
Helper Scripts Project Configuration
-------------- ---------------------
The projects up until now have all had a run_tests.sh and a with_venv.sh All OpenStack projects use `pbr` for consistent operation of setuptools.
script. run_tests.sh should be able to be easily re-written to pass things To accomplish this, all setup.py files only contain a simple setup function
along to the above tox commands. with_venv.sh is also easy - the tox venv that setup_requires on an unversioned pbr, and a directive to pass processing
environment (tox -evenv) is available to run arbitrary commands in the context to the pbr library. Actual project configuration is then handled in setup.cfg.
of a tox virtualenv.
Generated Files Generated Files
--------------- ---------------
ChangeLog and AUTHORS files should be generated at setup.py sdist time. Code ChangeLog and AUTHORS files are generated at setup.py sdist time. This is
exists in oslo in the setup module to support that. handled by pbr.
.mailmap files should exist where a developer has more than one email address .mailmap files should exist where a developer has more than one email address
or identity, and should map to the developer's canonical identity. or identity, and should map to the developer's canonical identity.