Skip to content

Commit f0d0139

Browse files
dkrucesmcgrof
authored andcommitted
blktests: diy: add callback support
Print useful info to the user when using DIY callback. Signed-off-by: Daniel Gomez <[email protected]> Signed-off-by: Luis Chamberlain <[email protected]>
1 parent a5ef0e9 commit f0d0139

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

playbooks/roles/blktests/tasks/main.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@
346346
- all_limit_tests is defined
347347
- all_limit_tests != None
348348
- all_limit_tests | length > 0
349+
vars:
350+
ansible_callback_diy_runner_on_ok_msg: "{{ ansible_callback_diy.result.output.msg }}"
349351

350352
- name: Stop blktests if we're debbugging limit_tests
351353
ansible.builtin.meta: end_play
@@ -356,6 +358,9 @@
356358
- name: Run blktests using oscheck.sh
357359
vars:
358360
group: "{{ ansible_host | regex_replace('blktests-') | regex_replace(kdevops_host_prefix + '-') | regex_replace('-dev') | regex_replace('-', '_') }}"
361+
ansible_callback_diy_runner_on_ok_msg: |
362+
$ {{ ansible_callback_diy.result.output.cmd | join(' ') }}
363+
{{ ansible_callback_diy.result.output.stdout | default('') }}
359364
tags: ["blktests", "run_tests"]
360365
become: true
361366
become_flags: "su - -c"
@@ -455,6 +460,8 @@
455460
msg: "New expunge files found: {{ new_expunges.stdout_lines }}"
456461
when:
457462
- new_expunges.stdout != 0
463+
vars:
464+
ansible_callback_diy_runner_on_ok_msg: "{{ ansible_callback_diy.result.output.msg }}"
458465

459466
- name: Check if results directory is empty
460467
ansible.builtin.find:
@@ -472,6 +479,8 @@
472479
run_once: true
473480
tags: ["blktests", "copy_results", "augment_expunge_list"]
474481
delegate_to: localhost
482+
vars:
483+
ansible_callback_diy_runner_on_ok_msg: "{{ ansible_callback_diy.result.output.msg }}"
475484

476485
# You are encouraged to commit the compressed results of failed tests
477486
# so we keep an archive

0 commit comments

Comments
 (0)