Collect partial subunit files
If (s)testr are killed during a test run (possibly due to a timeout) they will "leak" a tmp file containing the subunit stream to that point. This file is useful for debugging so collect it. We don't process it further as the file is a partial stream and humans may need to look at it to make sense of it. Change-Id: I6f0e61ec78f4dd9e2c4e52bc968b4f57586cb22e
This commit is contained in:
parent
44d2187e7f
commit
8a08cb94ac
@ -43,5 +43,31 @@
|
|||||||
state: absent
|
state: absent
|
||||||
failed_when: false
|
failed_when: false
|
||||||
|
|
||||||
|
# If (s)testr was stopped early (possibly due to a timeout) it will "leak"
|
||||||
|
# a tmp file of the inflight subunit stream. Collect this as it is useful
|
||||||
|
# for debugging in these situations. Because it isn't a complete file
|
||||||
|
# we don't process it further.
|
||||||
|
- name: Find any inflight partial subunit files
|
||||||
|
find:
|
||||||
|
paths:
|
||||||
|
- "{{ zj_item }}/.testrepository"
|
||||||
|
- "{{ zj_item }}/.stestr"
|
||||||
|
patterns:
|
||||||
|
- 'tmp*'
|
||||||
|
register: partial_subunit_files
|
||||||
|
loop: "{{ all_subunit_dirs }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: zj_item
|
||||||
|
|
||||||
|
- name: Copy any inflight subunit files
|
||||||
|
copy:
|
||||||
|
dest: "{{ zuul_output_dir }}/logs/"
|
||||||
|
src: "{{ zj_item.path }}"
|
||||||
|
remote_src: true
|
||||||
|
with_items: "{{ partial_subunit_files.files }}"
|
||||||
|
loop_control:
|
||||||
|
loop_var: zj_item
|
||||||
|
when: partial_subunit_files.files is defined
|
||||||
|
|
||||||
- name: Process and fetch subunit results
|
- name: Process and fetch subunit results
|
||||||
include_tasks: process.yaml
|
include_tasks: process.yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user