Martin Kopec 5c0373b287 Run all main target programs' tests
Run tests from all main target programs, for that a new
refstack_target_programs var is defined. The var will cause the
role to execute  'refstack-client test' command for every given
target program.
Collect whole .stestr dir in the zuul jobs as there will be
multiple output files (for every given target program).
Bump the default guideline to the latest one (2020.11).
The patch also fixes a few style mistakes/typos.

Change-Id: I82ba0bf26b994d4e21acabcb015d798081a33da2
2021-03-18 16:43:49 +00:00

46 lines
1.3 KiB
YAML

---
- name: Install required packages
include: install-packages.yaml
- include_tasks: install-refstack-client.yaml
- name: Generate accounts.yaml file
include: generate-accounts.yaml
when: accounts_path is not defined
- name: Set path to provided accounts.yaml
set_fact:
path_to_accounts_file: "{{ accounts_path }}"
when: accounts_path is defined
- name: Generate tempest.conf file
include: generate-tempestconf.yaml
when: tempest_config_path is not defined
- name: Set path to provided tempest.conf
set_fact:
path_to_tempest_config: "{{ tempest_config_path }}"
when: tempest_config_path is defined
- include_tasks: run-refstack-client.yaml
- include_tasks: post-tasks.yaml
when: upload_results | bool or download_artifacts | bool
- when: test_list is defined
block:
- name: Check if we passed refstack tests
fail:
msg: "Refstack tests failed."
# the refstack_result var got set in run-refstack-client.yaml
when: refstack_result.rc > 0
- when: test_list is not defined
block:
- name: Check if we passed tests of all specified target programs
fail:
msg: "Refstack tests failed."
# the refstack_result var got set in run-refstack-client.yaml
when: item.rc > 0
with_items: "{{ refstack_result.results }}"