rpm-packaging/tox.ini
Thomas Bechtold ccdae17907 Allow lint runs for a single spec
Currently, a "tox -e lint" run takes a lot of time. But when
developing locally and changing a single spec template, this is
annoying.
So allow a second positional argument for the 3 tools from the tools/
directory which is a string used by the "-name" argument from
"find". With that, it is possible to call lint for a single spec
template with eg:

tox -elint python-cliff

Change-Id: I1ba05ed4e353728d251105fc7ad356d759813481
2019-04-10 13:36:09 +02:00

27 lines
762 B
INI

[tox]
minversion = 2.1
envlist = rpm-packaging-lint
skipsdist = True
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
LC_ALL=en_US.utf-8
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
deps = -r{toxinidir}/test-requirements.txt
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:linters]
commands =
{toxinidir}/tools/run_renderspec.sh {toxinidir} {posargs}
{toxinidir}/tools/run_specchecks.sh {toxinidir} {posargs}
{toxinidir}/tools/run_speccleaner.sh {toxinidir} {posargs}
# compat. remove me
[testenv:lint]
commands = {[testenv:linters]commands}
[testenv:venv]
commands = {posargs}