List system dependencies for running common tests

Add an other-requirements.txt file containing a cross-platform list of
dependencies needed for running included tox-based tests. Also include a
tox environment for convenience calling the bindep[*] utility to list
any missing system requirements.

Document bindep and other-requirements usage.

This change is self-testing.

For other-requirements.txt see also
http://docs.openstack.org/infra/manual/drivers.html#package-requirements

[*] http://docs.openstack.org/infra/bindep/

Change-Id: Iea6f5fecba3b7cb9f6dac7029c0f17fc31fc0e3c
This commit is contained in:
Andreas Jaeger 2016-03-28 18:21:22 +02:00
parent 5902015fa8
commit 92274d4790
4 changed files with 30 additions and 0 deletions

View File

@ -27,6 +27,12 @@ To execute the tests:
pip install tox
* Generate list of distribution packages to install for testing::
tox -e bindep
Now install these packages using your distribution package manager
like apt-get, dnf, yum, or zypper.
* Run Tox from the root of the swift repo::

View File

@ -15,6 +15,7 @@ Swift is written in Python and has these dependencies:
* rsync 3.0
* The Python packages listed in `the requirements file <https://github.com/openstack/swift/blob/master/requirements.txt>`_
* Testing additionally requires `the test dependencies <https://github.com/openstack/swift/blob/master/test-requirements.txt>`_
* Testing requires `these distribution packages <https://github.com/openstack/swift/blob/master/other-requirements.txt>`_
There is no current support for Python 3.

15
other-requirements.txt Normal file
View File

@ -0,0 +1,15 @@
# This is a cross-platform list tracking distribution packages needed by tests;
# see http://docs.openstack.org/infra/bindep/ for additional information.
build-essential [platform:dpkg]
gcc [platform:rpm]
gettext
liberasurecode-dev [platform:dpkg]
liberasurecode-devel [platform:rpm]
libffi-dev [platform:dpkg]
libffi-devel [platform:rpm]
memcached
python-dev [platform:dpkg]
python-devel [platform:rpm]
rsync
xfsprogs

View File

@ -80,3 +80,11 @@ commands = bandit -c bandit.yaml -r swift bin -n 5 -p gate
ignore = F812,H101,H202,H233,H301,H306,H401,H403,H404,H405,H501,H703
exclude = .venv,.tox,dist,*egg
show-source = True
[testenv:bindep]
# Do not install any requirements. We want this to be fast and work even if
# system dependencies are missing, since it's used to tell you what system
# dependencies are missing! This also means that bindep must be installed
# separately, outside of the requirements files.
deps = bindep
commands = bindep test