Flip ensure-tox to tox v4 by default
The previous change added a bunch of tox v4 compatiblity, now we switch to as our default. This should only happen after people have had sufficient time to add tox v4 compatibility or manually pin back to <4 in their projects. Change-Id: I16742fb933dba2162a73d532e1a9613af69021aa
This commit is contained in:
parent
66a8e51945
commit
13925d1965
@ -6,13 +6,12 @@ virtual environment for the current user.
|
||||
**Role Variables**
|
||||
|
||||
.. zuul:rolevar:: ensure_tox_version
|
||||
:default: '<4'
|
||||
:default: ''
|
||||
|
||||
Version specifier to select the version of tox. For example if your
|
||||
project is not compatible with tox v4 you can set this value to
|
||||
`<4` to install the latest v3 release. We have started this value
|
||||
at `<4` for maximum compatibility, but expect it to change to ''
|
||||
in the future when tox v4 is better understood.
|
||||
`<4` to install the latest v3 release. The default is '' which
|
||||
installs latest.
|
||||
|
||||
.. zuul:rolevar:: tox_prefer_python2
|
||||
:default: False
|
||||
|
@ -1,5 +1,5 @@
|
||||
tox_executable: tox
|
||||
ensure_tox_version: '<4'
|
||||
ensure_tox_version: ''
|
||||
tox_venv_path: '{{ ansible_user_dir }}/.local/tox'
|
||||
tox_prefer_python2: false
|
||||
ensure_global_symlinks: false
|
||||
|
@ -56,14 +56,14 @@
|
||||
post_tasks:
|
||||
- name: Check for artifact on the test instance
|
||||
stat:
|
||||
path: "{{ ansible_user_dir }}/zuul-output/logs/tox/venv/venv-0.log"
|
||||
path: "{{ ansible_user_dir }}/zuul-output/logs/tox/venv/1-install_package.log"
|
||||
register: _test_artifact
|
||||
failed_when: not _test_artifact.stat.exists
|
||||
when: zuul_use_fetch_output
|
||||
|
||||
- name: Check for artifact on the executor
|
||||
stat:
|
||||
path: "{{ zuul.executor.log_root }}/tox/venv/venv-0.log"
|
||||
path: "{{ zuul.executor.log_root }}/tox/venv/1-install_package.log"
|
||||
delegate_to: localhost
|
||||
register: _executor_artifact
|
||||
failed_when: not _executor_artifact.stat.exists
|
||||
|
@ -76,12 +76,22 @@
|
||||
register: ALL_status
|
||||
failed_when: ALL_status is changed
|
||||
|
||||
- name: Move test-playbooks/python/tox.ini to test-playbooks/python/foo.ini
|
||||
# Tox 4 appears to have trouble when there is a tox.ini in the current
|
||||
# dir and you run it with -c pointing at another file. Work around this
|
||||
# to test the use of -c by moving the tox.ini to another location
|
||||
# and -c'ing against that in the next task.
|
||||
command: mv tox.ini foo.ini
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}/test-playbooks/python/"
|
||||
|
||||
- name: Run tox against a specific config file
|
||||
include_role:
|
||||
name: tox
|
||||
vars:
|
||||
zuul_work_dir: "{{ zuul.project.src_dir }}/test-playbooks/python/"
|
||||
# Make sure the tox_config_file option works
|
||||
tox_config_file: test-playbooks/python
|
||||
tox_config_file: foo.ini
|
||||
tox_envlist: 'foo'
|
||||
# Make sure we test with verbose output even if the default changes
|
||||
tox_extra_args: '-vv'
|
||||
|
@ -350,6 +350,7 @@
|
||||
description: Test the tox role's sibling functionality
|
||||
files:
|
||||
- roles/tox/.*
|
||||
- roles/ensure-tox/.*
|
||||
- tox.ini
|
||||
- test-playbooks/python/tox.yaml
|
||||
- test-playbooks/python/tox.ini
|
||||
|
Loading…
Reference in New Issue
Block a user