Add bindep support

Add an bindep.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.

Cyborg requires package 'pciutils' because it is required for running
'lspci' command, this patch also add it.

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

Change-Id: If8eca0bcc187aed9fb2ef6794171a1acbc202079
This commit is contained in:
Yikun Jiang 2019-08-05 14:30:14 +08:00
parent d88068f3c2
commit 7a4c80e7e2
2 changed files with 17 additions and 0 deletions

5
bindep.txt Normal file
View File

@ -0,0 +1,5 @@
# This file contains runtime (non-python) dependencies
# More info at: http://docs.openstack.org/infra/bindep/readme.html
# Required for running the 'lspci' command
pciutils

12
tox.ini
View File

@ -35,6 +35,18 @@ envdir = {toxworkdir}/venv
commands =
oslo-config-generator --config-file=tools/config/cyborg-config-generator.conf
[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, and develop mode disabled
# explicitly to avoid unnecessarily installing the checked-out repo too (this
# further relies on "tox.skipsdist = True" above).
basepython = python3
deps = bindep
commands = bindep test
usedevelop = False
[testenv:pep8]
basepython = python3