92248c8506
- Acreate a new tools/run_tests.py script to execute test cases - Move report generation to such script and remove 'report' tox environment - Running test cases generates report files (.log, .html, .xml) into 'report/{envname}' directory - Test cases failures will returns exit code 1 Other script test runner failures returns exit code 2 Big refactory to tox.ini file to try semplifying it: - create the new 'py3' tox environment for running unit tests as default platform python 3 interpreter - use same as py3 '{envdir}' for scenario, functional, neutron and faults tox environments Change-Id: Id09425245cc86b84b41e6b3b1c1db759cc686f3a
42 lines
948 B
YAML
42 lines
948 B
YAML
---
|
|
|
|
- name: "find for collected files in '{{ test_collect_dir }}'"
|
|
find:
|
|
paths:
|
|
- "{{ test_collect_dir }}"
|
|
patterns:
|
|
- "tobiko.conf"
|
|
- "tobiko.log"
|
|
- "{{ test_report_name }}*.log"
|
|
- "{{ test_report_name }}*.subunit"
|
|
- "{{ test_report_name }}*.html"
|
|
- "{{ test_report_name }}*.xml"
|
|
register: find_collected_files
|
|
|
|
|
|
- name: "set collected_files fact"
|
|
set_fact:
|
|
collected_files: >
|
|
{{ find_collected_files.files |
|
|
map(attribute='path') |
|
|
map('basename') |
|
|
list }}
|
|
|
|
|
|
- block:
|
|
- name: "check collected files"
|
|
assert:
|
|
that:
|
|
- item in collected_files
|
|
loop:
|
|
- tobiko.log
|
|
- tobiko.conf
|
|
- '{{ test_report_name }}.log'
|
|
- '{{ test_report_name }}.html'
|
|
- '{{ test_report_name }}.subunit'
|
|
- '{{ test_report_name }}.xml'
|
|
|
|
rescue:
|
|
- debug: var=collected_files
|
|
failed_when: yes
|