Fix build

- Pull charm-helpers from master
- Pin setuptools<82.0.0, the last version with pkg_resources
- Move func-* tox targets to the main tox.ini

Change-Id: Ia809337419317b940d636cfb9e682457c21ca076
Signed-off-by: Felipe Reyes <felipe.reyes@canonical.com>
This commit is contained in:
Felipe Reyes
2026-06-21 22:44:11 -04:00
parent b30e0ad41d
commit 93ee45ba54
4 changed files with 41 additions and 63 deletions
-57
View File
@@ -1,57 +0,0 @@
# Source charm (with zaza): ./src/tox.ini
# This file is managed centrally by release-tools and should not be modified
# within individual charm repos. See the 'global' dir contents for available
# choices of tox.ini for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
[tox]
envlist = pep8
# NOTE: Avoid build/test env pollution by not enabling sitepackages.
sitepackages = False
# NOTE: Avoid false positives by not skipping missing interpreters.
skip_missing_interpreters = False
[testenv]
# We use tox mainly for virtual environment management for test requirements
# and do not install the charm code as a Python package into that environment.
# Ref: https://tox.wiki/en/latest/config.html#skip_install
skip_install = True
setenv = VIRTUAL_ENV={envdir}
PYTHONHASHSEED=0
allowlist_externals = juju
passenv =
HOME
TERM
CS_*
OS_*
TEST_*
deps =
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt}
-r{toxinidir}/test-requirements.txt
[testenv:pep8]
basepython = python3
commands = charm-proof
[testenv:func-noop]
basepython = python3
commands =
functest-run-suite --help
[testenv:func]
basepython = python3
commands =
functest-run-suite --keep-model
[testenv:func-smoke]
basepython = python3
commands =
functest-run-suite --keep-model --smoke
[testenv:func-target]
basepython = python3
commands =
functest-run-suite --keep-model --bundle {posargs}
[testenv:venv]
commands = {posargs}
+2
View File
@@ -2,6 +2,8 @@
keystoneauth1
python-glanceclient
setuptools<82.0.0
git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack
git+https://github.com/juju/charm-helpers.git#egg=charmhelpers
+3 -6
View File
@@ -3,14 +3,10 @@
# choices of *requirements.txt files for OpenStack Charms:
# https://github.com/openstack-charmers/release-tools
#
pyparsing<3.0.0 # aodhclient is pinned in zaza and needs pyparsing < 3.0.0, but cffi also needs it, so pin here.
looseversion
setuptools<82.0.0
stestr>=2.2.0
# Dependency of stestr. Workaround for
# https://github.com/mtreinish/stestr/issues/145
cliff<3.0.0
requests>=2.18.4
charms.reactive
@@ -18,6 +14,7 @@ mock>=1.2
nose>=1.3.7
coverage>=3.6
git+https://github.com/juju/charm-helpers.git#egg=charmhelpers
git+https://github.com/openstack/charms.openstack.git#egg=charms.openstack
#
# Revisit for removal / mock improvement:
+36
View File
@@ -86,6 +86,42 @@ deps = flake8==7.1.1
git+https://github.com/juju/charm-tools.git
commands = flake8 {posargs} src unit_tests
[testenv:func-noop]
basepython = python3
changedir = {toxinidir}/src
deps =
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt}
-r{toxinidir}/src/test-requirements.txt
commands =
functest-run-suite --help
[testenv:func]
basepython = python3
changedir = {toxinidir}/src
deps =
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt}
-r{toxinidir}/src/test-requirements.txt
commands =
functest-run-suite --keep-model
[testenv:func-smoke]
basepython = python3
changedir = {toxinidir}/src
deps =
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt}
-r{toxinidir}/src/test-requirements.txt
commands =
functest-run-suite --keep-model --smoke
[testenv:func-target]
basepython = python3
changedir = {toxinidir}/src
deps =
-c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-noble.txt}
-r{toxinidir}/src/test-requirements.txt
commands =
functest-run-suite --keep-model --bundle {posargs}
[testenv:cover]
# Technique based heavily upon
# https://github.com/openstack/nova/blob/master/tox.ini