Make test_results folder visible in zuul

This patch moves test result logs [1] to tox folder [2]
so that it is automatically added to the list of log files by zuul

[1] sova.log, test_results/*
[2] .tox/<envname>/log

Change-Id: I57e4b05e199ded91b5ab26fa4054d6bbf1192fd2
This commit is contained in:
frenzyfriday 2021-05-06 15:29:40 +02:00
parent 2adebed2f7
commit b5e608ae8a
2 changed files with 5 additions and 4 deletions

View File

@ -6,7 +6,7 @@
vars:
er_dir: '../output/elastic-recheck'
test_results_dir: '../test_results'
test_results_dir: "../.tox/py{{ ansible_python_version.split('.')[:-1] | join('') }}/log/test_results"
tasks:
- name: Make sure dir for test output exists

View File

@ -11,6 +11,7 @@
samples_log: "{{ samples_dir }}/errors-testing.err"
queries_file: "{{ lookup('file', playbook_dir + '/../src/data/queries.yml') | from_yaml }}"
query_ids: []
sova_log: "../.tox/py{{ ansible_python_version.split('.')[:-1] | join('') }}/log/sova.log"
tasks:
- name: Display file to be tested
debug:
@ -31,7 +32,7 @@
config: "{{ sova_cfg_file }}"
files:
console: "{{ samples_log }}"
result: "sova.log"
result: "{{ sova_log }}"
result_file_dir: "{{ (playbook_dir, '../output') | path_join | realpath }}"
register: result
@ -44,11 +45,11 @@
msg: "Unexpected result: {{ result }}"
when: >
samples_log not in result.processed_files
or result.file_written != 'sova.log'
or result.file_written != sova_log
- name: Get list of failures detected by sova
set_fact:
failure_list: "{{ lookup('file', 'sova.log').split('\n')[0].split(' ') }}"
failure_list: "{{ lookup('file', sova_log).split('\n')[0].split(' ') }}"
- name: Fail if sova doesn't find a match for all the regexes
fail: