freeipa/tox.ini
Stanislav Levin c7500220c4 Avoid use of '/tmp' for pip operations
`ipa-run-tests` is not an entry_point script, so
pip during an installation of ipatests package checks
if the file path is executable. If not - just don't set
the executable permission bits.

pip's working directory defaults to /tmp/xxx.
Thus, if /tmp is mounted with noexec such scripts lose
their executable ability after an installation into
virtualenv. This was found on Travis +
freeipa/freeipa-test-runner:master-latest docker image.

Build directory of pip could be changed via env variable
PIP_BUILD, for example.

Fixes: https://pagure.io/freeipa/issue/8009
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
2019-07-16 13:23:21 +03:00

56 lines
1.4 KiB
INI

[tox]
minversion=2.3.1
envlist=py36,py37,pylint3,pypi
skip_missing_interpreters=true
skipsdist=true
[testenv]
# always re-create virtual env. A special install helper is used to configure,
# build and install packages.
recreate=True
install_command={toxinidir}/.tox-install.sh wheel_bundle {envpython} {envsitepackagesdir} {envdir} {packages}
changedir={envdir}
setenv=
HOME={envtmpdir}
deps=
ipaclient[csrgen]
ipatests
commands=
{envbindir}/ipa --help
{envbindir}/ipa-run-tests --junitxml={envdir}/junit-{envname}.xml {posargs:--ipaclient-unittests}
[testenv:pylint3]
basepython=python3
deps=
ipaclient[csrgen,otptoken_yubikey,ldap]
pylint
commands=
{envpython} -m pylint \
--rcfile={toxinidir}/pylintrc \
--load-plugins pylint_plugins \
{envsitepackagesdir}/ipaclient \
{envsitepackagesdir}/ipalib \
{envsitepackagesdir}/ipapython
[testenv:pypi]
recreate=True
install_command={toxinidir}/.tox-install.sh pypi_packages {envpython} {envsitepackagesdir} {envdir} {packages}
changedir={envdir}
setenv=
HOME={envtmpdir}
deps=
pytest
ipaclient
# placeholder
ipaplatform
ipaserver
ipatests
commands=
{envpython} -m pytest {posargs:{toxinidir}/pypi/test_placeholder.py}
[pycodestyle]
# E402 module level import not at top of file
# W504 line break after binary operator
ignore = E402, W504