|
12 | 12 | - name: Set the path where we collect our local pynfs results |
13 | 13 | set_fact: |
14 | 14 | pynfs_workflow_dir: "../workflows/pynfs" |
| 15 | + pynfs_results_full_path: "{{ topdir_path }}/workflows/pynfs/results" |
| 16 | + pynfs_results_target: "../workflows/pynfs/results/last-run/" |
15 | 17 | tags: [ 'vars' ] |
16 | 18 |
|
17 | 19 | - name: Clean up our localhost results directory and files |
|
127 | 129 | delay: 1 |
128 | 130 | until: result.rc == 0 |
129 | 131 |
|
| 132 | +- name: Clean up our localhost results/last-run directory |
| 133 | + local_action: file path="{{ pynfs_results_target }}/" state=absent |
| 134 | + run_once: true |
| 135 | + tags: [ 'run_tests', 'copy_results', 'clean_local_results' ] |
| 136 | + |
| 137 | +- name: Create empty last-run directory |
| 138 | + local_action: file path="{{ pynfs_results_target }}/" state=directory |
| 139 | + run_once: true |
| 140 | + tags: [ 'run_tests', 'copy_results', 'clean_local_results' ] |
| 141 | + |
130 | 142 | - name: Run pynfs |
131 | 143 | tags: [ 'run_tests' ] |
132 | 144 | script: "{{ pynfs_workflow_dir }}/scripts/run_pynfs.sh" |
|
156 | 168 | kernel_rev: "{{ uname_cmd.stdout_lines | regex_replace('\\]') | regex_replace('\\[') | replace(\"'\",'') }}" |
157 | 169 | run_once: true |
158 | 170 |
|
| 171 | +- name: Document used target kernel version |
| 172 | + local_action: "shell echo {{ kernel_rev }} > {{ pynfs_results_target }}/../last-kernel.txt" |
| 173 | + tags: [ 'run_tests', 'copy_results', 'print_results' ] |
| 174 | + run_once: true |
| 175 | + |
159 | 176 | - name: Copy the version-specific results to the control node |
160 | 177 | tags: [ 'copy_results' ] |
161 | 178 | become: yes |
162 | 179 | become_flags: 'su - -c' |
163 | 180 | become_method: sudo |
164 | 181 | fetch: |
165 | 182 | src: "{{ pynfs_data }}/pynfs-{{ item }}-results.json" |
166 | | - dest: "{{ pynfs_workflow_dir }}/results/{{ kernel_rev }}-v{{ item }}.json" |
| 183 | + dest: "{{ pynfs_results_full_path }}/last-run/{{ kernel_rev}}/{{ kernel_rev }}-v{{ item }}.json" |
167 | 184 | flat: yes |
168 | 185 | with_items: |
169 | 186 | - 4.0 |
|
176 | 193 | become_method: ansible.builtin.sudo |
177 | 194 | fetch: |
178 | 195 | src: "{{ pynfs_data }}/pynfs-{{ item }}-results.json" |
179 | | - dest: "{{ pynfs_workflow_dir }}/results/{{ kernel_rev }}-v{{ item }}.json" |
| 196 | + dest: "{{ pynfs_results_full_path }}/last-run/{{ kernel_rev}}/{{ kernel_rev }}-v{{ item }}.json" |
180 | 197 | flat: true |
181 | 198 | with_items: |
182 | 199 | - block |
183 | 200 | when: |
184 | 201 | - pynfs_pnfs_block|bool |
| 202 | + |
| 203 | +- name: Verify last-run kernel directory exists |
| 204 | + tags: [ 'copy_results' ] |
| 205 | + delegate_to: localhost |
| 206 | + stat: |
| 207 | + path: "{{ pynfs_results_full_path }}/last-run/{{ kernel_rev }}" |
| 208 | + register: last_run_kernel_dir |
| 209 | + |
| 210 | +- name: Copy over the last-run into the results directory for archiving into kdevops |
| 211 | + copy: |
| 212 | + src: "{{ pynfs_results_full_path }}/last-run/{{ kernel_rev }}" |
| 213 | + dest: "{{ pynfs_results_full_path }}/" |
| 214 | + run_once: true |
| 215 | + tags: [ 'copy_results' ] |
| 216 | + delegate_to: localhost |
| 217 | + when: |
| 218 | + - last_run_kernel_dir.stat.exists |
0 commit comments