From b55f08a660799acf8e5473cb49884852a957f33a Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Sun, 15 Feb 2026 23:14:24 +0900 Subject: [PATCH] tox: Drop redundant injection of VIRTUAL_ENV variable The environment variable is set automatically. cf. https://github.com/tox-dev/tox/commit/be5373bab Change-Id: I1061ab6bac578cbee181a75ae38a89d3c64322cb Signed-off-by: Takashi Kajinami --- ironic_python_agent/inject_files.py | 4 ---- tox.ini | 6 ++---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ironic_python_agent/inject_files.py b/ironic_python_agent/inject_files.py index f092469c6..c06aac9d4 100644 --- a/ironic_python_agent/inject_files.py +++ b/ironic_python_agent/inject_files.py @@ -146,8 +146,6 @@ def _find_and_mount_path(path, partition, root_dev): with utils.mounted(partition) as part_path: yield os.path.join(part_path, path) else: - # TODO(dtantsur): switch to ironic-lib instead: - # https://review.opendev.org/c/openstack/ironic-lib/+/774502 part_template = '%s%s' if 'nvme' in root_dev: part_template = '%sp%s' @@ -189,8 +187,6 @@ def find_partition_with_path(path, device=None): LOG.debug('Skipping LVM partition %s', part) continue - # TODO(dtantsur): switch to ironic-lib instead: - # https://review.opendev.org/c/openstack/ironic-lib/+/774502 part_template = '%s%s' if 'nvme' in device: part_template = '%sp%s' diff --git a/tox.ini b/tox.ini index 6f79c0248..3adf46917 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,6 @@ envlist = py3,functional,pep8 constrain_package_deps = true usedevelop = True setenv = - VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 OS_TEST_PATH=./ironic_python_agent/tests/unit OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true} @@ -38,7 +37,6 @@ commands = # Define virtualenv directory, port to use for functional testing, and number # of seconds to wait for the agent to come alive during functional testing. setenv = - VIRTUAL_ENV={envdir} PYTHONDONTWRITEBYTECODE = 1 OS_TEST_PATH=./ironic_python_agent/tests/functional TEST_PORT=9999 @@ -51,8 +49,8 @@ allowlist_externals = pre-commit commands = pre-commit run --all-files --show-diff-on-failure {posargs} [testenv:cover] -setenv = VIRTUAL_ENV={envdir} - PYTHON=coverage run --source ironic_python_agent --omit='*tests*' --parallel-mode +setenv = + PYTHON=coverage run --source ironic_python_agent --omit='*tests*' --parallel-mode commands = coverage erase stestr run {posargs}