Merge "List system dependencies for running common tests"

This commit is contained in:
Zuul 2018-11-02 04:58:24 +00:00 committed by Gerrit Code Review
commit 0e0162ecce
3 changed files with 68 additions and 22 deletions

34
bindep.txt Normal file
View File

@ -0,0 +1,34 @@
# This file contains runtime (non-python) dependencies
# More info at: http://docs.openstack.org/infra/bindep/readme.html
# tools/misc-sanity-checks.sh validates .po[t] files
gettext [test]
graphviz [doc test]
# cffi (required by oslo.privsep) and PyNaCL (required by paramiko)
libffi-dev [platform:dpkg]
libffi-devel [platform:rpm]
# MySQL and PostgreSQL databases since some jobs are set up in
# OpenStack infra that need these like
libmysqlclient-dev [platform:dpkg test]
mysql [platform:rpm test]
mysql-client [platform:dpkg test]
mysql-devel [platform:rpm test]
mysql-server [test]
postgresql [test]
postgresql-client [platform:dpkg test]
postgresql-devel [platform:rpm test]
postgresql-server [platform:rpm test]
# Zun's test-requirements requires tempest which requires paramiko
# which requires cryptography which requires ssl.
libssl-dev [platform:dpkg]
openssl-devel [platform:rpm !platform:suse]
libopenssl-devel [platform:suse !platform:rpm]
# Python3 packages
python3-all [platform:dpkg !platform:ubuntu-precise]
python3-all-dev [platform:dpkg !platform:ubuntu-precise]
python3-devel [platform:fedora]
python34-devel [platform:centos]

View File

@ -21,28 +21,6 @@ machine.
Prerequisite
============
Install OS-specific prerequisites::
# Ubuntu/Debian (recommend Ubuntu 16.04):
sudo apt-get update
sudo apt-get install libmysqlclient-dev build-essential python-dev \
python3.5-dev git libssl-dev libffi-dev \
python-gdbm
Install pip::
curl -s https://bootstrap.pypa.io/3.2/get-pip.py | sudo python
Install common prerequisites::
sudo pip install virtualenv flake8 tox testrepository git-review os-testr
You may need to explicitly upgrade virtualenv if you've installed the one
from your OS distribution and it is too old (tox will complain). You can
upgrade it individually, if you need to::
sudo pip install -U virtualenv
Zun source code should be pulled directly from git::
# from your home or source directory
@ -50,6 +28,30 @@ Zun source code should be pulled directly from git::
git clone https://git.openstack.org/openstack/zun
cd zun
Install the prerequisite packages listed in the ``bindep.txt`` file.
On Debian-based distributions (e.g., Debian/Mint/Ubuntu)::
# Ubuntu/Debian (recommend Ubuntu 16.04):
sudo apt-get update
sudo apt-get install python-pip
sudo pip install tox
tox -e bindep
sudo apt-get install <indicated missing package names>
On Fedora-based distributions (e.g., Fedora/RHEL/CentOS/Scientific Linux)::
sudo yum install python-pip
sudo pip install tox
tox -e bindep
sudo yum install <indicated missing package names>
On openSUSE-based distributions (SLES 12, openSUSE Leap 42.1 or Tumbleweed)::
sudo zypper in python-pip
sudo pip install tox
tox -e bindep
sudo zypper in <indicated missing package names>
Running the tests
=================

10
tox.ini
View File

@ -133,3 +133,13 @@ deps =
-c{toxinidir}/lower-constraints.txt
-r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
# This environment can be used to quickly validate that all needed system
# packages required to successfully execute test targets are installed
[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