Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: improve the PMEM RAS workflow output #6103

Merged
merged 1 commit into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/pmem_ras.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,13 @@ jobs:
- name: Clone the git repo
uses: actions/checkout@v4

# Variables, such as $ras_runner are set on the controller platform as environment variables.
# Variables, such as $ras_runner are set on the controller platform
# as environment variables.
- name: Prepare and run RAS Linux tests via ansible-playbook
working-directory: ${{ env.WORKDIR }}
run: ansible-playbook -i $ras_runner, run-ras-linux.yml -e "host=all ansible_user=$ras_user"
env:
# Increases human readability in case of a failure
ANSIBLE_STDOUT_CALLBACK: yaml
run: >
ansible-playbook -i $ras_runner, run-ras-linux.yml
-e "host=all ansible_user=$ras_user"
43 changes: 29 additions & 14 deletions utils/gha-runners/run-ras-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@

tasks:

# pmdk-tests requires cmake for building
# pmdk-tests requires cmake for building
- name: "Ensure cmake availability in the system"
package:
state: present
Expand Down Expand Up @@ -205,17 +205,32 @@
cmd: "make -j install prefix={{ pmdk_install_dir_path }}"
chdir: "{{ repo.pmdk.target_dir }}"
executable: "{{ bash_path }}"
register: output

- name: "Configure & build pmdk-tests"
- name: "Build PMDK - output"
debug:
msg: |
::group::Build PMDK
{{ output.stderr_lines | to_nice_yaml }}
{{ output.stdout_lines | to_nice_yaml }}
::endgroup::

- name: "Build pmdk-tests"
shell:
cmd: "{{ item }}"
cmd: "cmake '{{ repo.pmdk_tests.target_dir }}' && make -j"
chdir: "{{ pmdk_tests_build_dir_path }}"
executable: "{{ bash_path }}"
environment:
PKG_CONFIG_PATH: "{{ pmdk_install_dir_path }}/lib/pkgconfig/"
with_items:
- "cmake '{{ repo.pmdk_tests.target_dir }}'"
- "make -j"
register: output

- name: "Build pmdk-tests - output"
debug:
msg: |
::group::Build pmdk-tests
{{ output.stderr_lines | to_nice_yaml }}
{{ output.stdout_lines | to_nice_yaml }}
::endgroup::

- name: "Create template for config.xml file"
lineinfile:
Expand All @@ -240,18 +255,18 @@
- mountPoint: /mnt/{{item}}
with_items: "{{ uuids }}"

- name: "Run the first phase of tests"
- name: "Phase 1 - run tests"
shell:
cmd: PATH=$PATH:{{ pmdk_install_dir_path }}/bin ./UNSAFE_SHUTDOWN_LOCAL 1 inject all --gtest_output=xml:{{ logs_dir_path }}/phase1.xml
chdir: "{{ pmdk_tests_build_dir_path }}"
executable: "{{ bash_path }}"
environment:
LD_LIBRARY_PATH: "{{ pmdk_install_dir_path }}/lib/"
register: phase_1
ignore_errors: true

- name: "Print phase I output"
debug: var=phase_1
- name: "Phase 1 - output"
debug:
var: phase_1

- name: "Flush filesystems before power cycle"
shell: "sync"
Expand Down Expand Up @@ -282,18 +297,18 @@
- "{{ uuids }}"
- "{{ pmem_devices }}"

- name: "Run the second phase of tests"
- name: "Phase 2 - run tests"
shell:
cmd: PATH=$PATH:{{ pmdk_install_dir_path }}/bin ./UNSAFE_SHUTDOWN_LOCAL 2 cleanup all --gtest_output=xml:{{ logs_dir_path }}/phase2.xml
chdir: "{{ pmdk_tests_build_dir_path }}"
executable: "{{ bash_path }}"
environment:
LD_LIBRARY_PATH: "{{ pmdk_install_dir_path }}/lib/"
register: phase_2
ignore_errors: true

- name: "Print phase II output"
debug: var=phase_2
- name: "Phase 2 - output"
debug:
var: phase_2

# 'always' section makes sure that the temporary files are deleted regardless of the results.
always:
Expand Down
Loading