Reset tox_env and other params for every test workflow step

The tox env values defined at step N are reused at step N+1
These values should be reset at the end of every step

Change-Id: Ied76f789a071e50917ce6752ecea17140775a99f
This commit is contained in:
Eduardo Olivares 2022-08-05 13:00:13 +02:00
parent fb0d57e810
commit 4ff3f54fdf

View File

@ -13,11 +13,14 @@
tox_command_line: '{{ tox_command_line.split() | join(" ") }}'
- name: initialize tox_env to empty dict for each test suite execution
set_fact:
tox_env: {}
- name: combine and normalize environment variable values
set_fact:
tox_env: >
{{ tox_env |
default({}) |
combine({ item.key: (item.value | string).strip() }) }}
loop: >
{{ ((tox_environment | from_yaml | dict2items) +
@ -45,6 +48,15 @@
ignore_errors: yes
- name: reset values used to generate tox_constrain_env after executing a test suite
set_fact:
pytest_addopts: ''
test_flaky: false
pytest_markers: "{% if not test_flaky%}not flaky{% endif %}"
pytest_maxfail: ''
tox_constraints: ''
tox_run_tests_timeout: 18000
- name: "show test cases errors"
debug: var=run_tox.stderr_lines
when: