Move tox logs into env specific dirs

New tox>=4 does not prefix the filenames with the env name. THis means
we'll squash together log files if more than one env is run. Address
this while on tox v3 to avoid regressions.

Change-Id: I2601cc7faa1f7a5d7f2d950d637dfa84c50717ae
This commit is contained in:
Clark Boylan 2022-12-07 13:53:23 -08:00
parent 31b6a6730a
commit e5dc872f09
2 changed files with 4 additions and 4 deletions

View File

@ -64,7 +64,7 @@
- name: Copy tox logs # noqa risky-file-permissions
copy:
dest: "{{ zuul_output_dir }}/logs/tox/"
dest: "{{ zuul_output_dir }}/logs/tox/{{ zj_testenv }}/"
src: "{{ zuul_work_dir }}/.tox/{{ zj_testenv }}/log/"
remote_src: true
loop: "{{ envlist }}"
@ -77,7 +77,7 @@
- name: Collect tox logs
synchronize:
dest: "{{ log_path }}"
dest: "{{ log_path }}/{{ zj_testenv }}"
mode: pull
src: "{{ zuul_work_dir }}/.tox/{{ zj_testenv }}/log/"
verify_host: true

View File

@ -56,14 +56,14 @@
post_tasks:
- name: Check for artifact on the test instance
stat:
path: "{{ ansible_user_dir }}/zuul-output/logs/tox/venv-0.log"
path: "{{ ansible_user_dir }}/zuul-output/logs/tox/venv/venv-0.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-0.log"
path: "{{ zuul.executor.log_root }}/tox/venv/venv-0.log"
delegate_to: localhost
register: _executor_artifact
failed_when: not _executor_artifact.stat.exists