Execution
Date
08 Dec 2025 13:39:52 +0000
Duration
00:35:02.03
Controller
aio1.openstack.local
User
root
Versions
Ansible
2.18.6
ara
1.7.4 / 1.7.4
Python
3.12.3
Summary
2
Hosts
1377
Tasks
1365
Results
104
Plays
504
Files
0
Records
File: /home/zuul/src/opendev.org/openstack/openstack-ansible-os_tempest/tasks/tempest_run.yml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 | --- # Copyright 2016, Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - name: Executing tempest and collect results block: - name: Execute tempest tests ansible.builtin.shell: | set -e if [ -d {{ tempest_venv_bin }} ]; then . {{ tempest_venv_bin }}/activate fi tempest run \ {% if tempest_run_concurrency is defined %} --concurrency {{ tempest_run_concurrency }} \ {% else %} --serial \ {% endif %} {% if tempest_test_worker_file_path is defined %} --worker-file {{ tempest_test_worker_file_path }} \ {% endif %} {% if _tempest_test_excludelist | length > 0 %} --exclude-list {{ tempest_excludelist_file_path }} \ {% endif %} --include-list {{ tempest_includelist_file_path }} > {{ tempest_log_dir }}/tempest_run.log args: chdir: "{{ tempest_workspace }}" executable: /bin/bash changed_when: false register: tempest_tests_run tags: # don't trigger ANSIBLE0013 - skip_ansible_lint always: - name: Generate raw subunit results # Despite not using testrepository, we leave the output filename as # testrepository.subunit as the OpenStack Health dashboard relies on # subunit files with this particular name. # NOTE(mattt): At present we're not placing this file in a valid location # to be used by the OpenStack Health dashboard. ansible.builtin.shell: | set -e if [ -d {{ tempest_venv_bin }} ]; then . {{ tempest_venv_bin }}/activate fi {{ stestr_executable }} last --subunit > {{ tempest_log_dir }}/testrepository.subunit args: chdir: "{{ tempest_workspace }}" executable: /bin/bash changed_when: false failed_when: false tags: # don't trigger ANSIBLE0013 - skip_ansible_lint - name: Generate xml subunit results ansible.builtin.shell: | set -e if [ -d {{ tempest_venv_bin }} ]; then . {{ tempest_venv_bin }}/activate fi subunit2junitxml {{ tempest_log_dir }}/testrepository.subunit > {{ tempest_log_dir }}/tempest_results.xml args: chdir: "{{ tempest_workspace }}" executable: /bin/bash changed_when: false failed_when: false tags: # don't trigger ANSIBLE0013 - skip_ansible_lint - name: Generate html subunit results ansible.builtin.shell: | set -e if [ -d {{ tempest_venv_bin }} ]; then . {{ tempest_venv_bin }}/activate fi subunit2html {{ tempest_log_dir }}/testrepository.subunit {{ tempest_log_dir }}/stestr_results.html args: chdir: "{{ tempest_workspace }}" executable: /bin/bash changed_when: false failed_when: false tags: # don't trigger ANSIBLE0013 - skip_ansible_lint - name: Generate test-list file ansible.builtin.shell: | set -e if [ -d {{ tempest_venv_bin }} ]; then . {{ tempest_venv_bin }}/activate fi tempest run \ --include-list {{ tempest_includelist_file_path }} \ {% if _tempest_test_excludelist | length > 0 %} --exclude-list {{ tempest_excludelist_file_path }} \ {% endif %} --list-tests &> {{ tempest_log_dir }}/test_list.txt args: chdir: "{{ tempest_workspace }}" executable: /bin/bash changed_when: false failed_when: false # Copy module doesn't copy recursively with remote_src set to true - name: Copy stackviz-html to home directory ansible.builtin.shell: | cp -r {{ stackviz_venv_bin | dirname }}/share/stackviz-html {{ tempest_log_dir }}/stackviz args: executable: /bin/bash tags: # don't trigger ANSIBLE0013 - skip_ansible_lint when: tempest_run_stackviz | bool - name: Collecting data from tempest run ansible.builtin.shell: | . {{ stackviz_venv_bin }}/activate stackviz-export -f {{ tempest_log_dir }}/testrepository.subunit --env {{ tempest_log_dir }}/stackviz/data args: chdir: "{{ tempest_workspace }}" executable: /bin/bash tags: # don't trigger ANSIBLE0013 - skip_ansible_lint when: tempest_run_stackviz | bool - name: Create tempest failing tests file ansible.builtin.shell: | set -e if [ -d {{ tempest_venv_bin }} ]; then . {{ tempest_venv_bin }}/activate fi {{ stestr_executable }} failing --list > {{ tempest_log_dir }}/failing_tests.log args: chdir: "{{ tempest_workspace }}" executable: /bin/bash failed_when: false changed_when: false tags: # don't trigger ANSIBLE0013 - skip_ansible_lint when: tempest_tests_run.rc != 0 - name: Fail if tempest tests did not succeed ansible.builtin.assert: that: - "tempest_tests_run.rc == 0" |