Adds tempest run command with --test-list option

In scenarios of setUpClass & tearDownClass failure
the xml output generated by tempest/subunit is inaccurate.
Generating a test-list will provide an accurate list of
tests that tempest attempted to execute based on all flags
passed to the 'tempest run' command.

Related-Bug: #1812254

Change-Id: I3eccee1c7b2c04c5766e713b1179bc645d3ccb82
This commit is contained in:
Zach Reichert 2019-01-16 15:36:37 -08:00 committed by Kevin Carter (cloudnull)
parent f2f3392031
commit 27a6afc4f6
1 changed files with 17 additions and 0 deletions

View File

@ -88,6 +88,23 @@
# don't trigger ANSIBLE0013
- skip_ansible_lint
- name: Generate test-list file
shell: |
set -e
if [ -d {{ tempest_venv_bin }} ];
then
. {{ tempest_venv_bin }}/activate
fi
tempest run --whitelist-file {{ tempest_test_whitelist_file_path }}{% if tempest_test_blacklist | length > 0 %} --blacklist-file {{ tempest_test_blacklist_file_path }}{% endif %} --list-tests &> {{ tempest_log_dir }}/test_list.txt
args:
chdir: "{{ tempest_workspace }}"
executable: /bin/bash
changed_when: false
failed_when: false
tags:
# don't trigger ANSIBLE0013
- skip_ansible_lint
- name: Fail if tempest tests did not succeed
assert:
that: