|
74 | 74 | /usr/bin/pwd |
75 | 75 | register: debug_working_dir |
76 | 76 |
|
77 | | - # REMOVE!! |
78 | | - # Why does the runner fail to find the tests??? |
79 | | - - name: Capture contents of the SCT repo |
80 | | - ansible.builtin.find: |
81 | | - path: "{{ repo_tmpdir.path }}" |
82 | | - file_type: "directory" |
83 | | - recurse: true |
84 | | - excludes: "{{ repo_tmpdir.path }}/.git" |
85 | | - register: contents |
86 | | - - name: Print the contents of the SCT repo |
87 | | - debug: |
88 | | - msg: "{{ item.path }}" |
89 | | - with_items: |
90 | | - - "{{ contents.files }}" |
91 | | - loop_control: |
92 | | - label: "{{ item.path }}" |
93 | | - |
94 | | - # MORE DEBUG TO REMOVE |
95 | | - - name: Get status of SCT checkout |
96 | | - ansible.builtin.command: |
97 | | - cmd: git status |
98 | | - chdir: "{{ repo_tmpdir.path }}" |
99 | | - register: git_status |
100 | | - - debug: |
101 | | - msg: "Status: {{git_status.stdout}}" |
102 | | - |
103 | | - # MORE DEBUG TO REMOVE |
104 | | - - name: Get log of SCT checkout |
105 | | - ansible.builtin.command: |
106 | | - cmd: git log |
107 | | - chdir: "{{ repo_tmpdir.path }}" |
108 | | - register: git_log |
109 | | - - debug: |
110 | | - msg: "Log: {{git_log.stdout}}" |
111 | | - |
112 | 77 | # Monitoring tests should run once, executed on the host in the |
113 | 78 | # tempest_runner group. |
114 | 79 | - name: Run StackHPC Cloud monitoring tests |
|
161 | 126 | # and allow us to execute all tests from a single host. |
162 | 127 | # https://testinfra.readthedocs.io/en/latest/backends.html#connection-backends |
163 | 128 | - name: Run StackHPC Cloud host tests |
164 | | - ansible.builtin.command: |
165 | | - cmd: > |
| 129 | + ansible.builtin.shell: |
| 130 | + cmd: | |
166 | 131 | {{ sct_venv }}/bin/py.test |
167 | 132 | --html={{ results_tmpdir.path }}/host-{{ inventory_hostname }}.html |
168 | 133 | --self-contained-html |
169 | 134 | --timeout {{ sct_timeout }} |
170 | 135 | -vv |
171 | | - "{{ repo_tmpdir.path }}/stackhpc_cloud_tests/host" |
| 136 | + "{{ repo_tmpdir.path }}/stackhpc_cloud_tests/host"; |
| 137 | + chmod 644 {{ results_tmpdir.path }}/host-{{ inventory_hostname }}.html |
172 | 138 | environment: |
173 | 139 | DOCKER_VERSION_MIN: "{{ sct_docker_version_min }}" |
174 | 140 | DOCKER_VERSION_MAX: "{{ sct_docker_version_max }}" |
|
182 | 148 | failed_when: host_results.rc not in [0, 1] |
183 | 149 | register: host_results |
184 | 150 | when: "'overcloud' in group_names" |
| 151 | + # Some checks may need root hence we chmod the resulting html for reading |
| 152 | + become: true |
| 153 | + |
185 | 154 | always: |
186 | 155 | - name: Synchronize results |
187 | 156 | ansible.posix.synchronize: |
|
0 commit comments