75af1509af
Reactive source charms are Python3-only, but have py27 unit tests declared in project-config. The Tox tool recently changed behavior. It used to pass when a tox target was missing commands. Now it fails in that case. This commit places a py27 no-op shim to allow gate tests to pass, effectively restoring the original behavior for these py3x-only repos. Change-Id: I652ae850c2cb8de7103cfe41caa861751893e9da Partial-Bug: 1642981
56 lines
1.4 KiB
INI
56 lines
1.4 KiB
INI
# Source charm: ./tox.ini
|
|
# This file is managed centrally by release-tools and should not be modified
|
|
# within individual charm repos.
|
|
[tox]
|
|
skipsdist = True
|
|
envlist = pep8,py34,py35
|
|
skip_missing_interpreters = True
|
|
|
|
[testenv]
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
PYTHONHASHSEED=0
|
|
TERM=linux
|
|
LAYER_PATH={toxinidir}/layers
|
|
INTERFACE_PATH={toxinidir}/interfaces
|
|
JUJU_REPOSITORY={toxinidir}/build
|
|
passenv = http_proxy https_proxy
|
|
install_command =
|
|
pip install {opts} {packages}
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
|
|
[testenv:build]
|
|
basepython = python2.7
|
|
commands =
|
|
charm-build --log-level DEBUG -o {toxinidir}/build src {posargs}
|
|
|
|
[testenv:py27]
|
|
basepython = python2.7
|
|
# Reactive source charms are Python3-only, but a py27 unit test target
|
|
# is required by OpenStack Governance. Remove this shim as soon as
|
|
# permitted. http://governance.openstack.org/reference/cti/python_cti.html
|
|
whitelist_externals = true
|
|
commands = true
|
|
|
|
[testenv:py34]
|
|
basepython = python3.4
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = ostestr {posargs}
|
|
|
|
[testenv:py35]
|
|
basepython = python3.5
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = ostestr {posargs}
|
|
|
|
[testenv:pep8]
|
|
basepython = python3.5
|
|
deps = -r{toxinidir}/test-requirements.txt
|
|
commands = flake8 {posargs} src unit_tests
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
# E402 ignore necessary for path append before sys module import in actions
|
|
ignore = E402
|