Skip to content

Commit

Permalink
Merge pull request #6103 from pmem/ras_experiment
Browse files Browse the repository at this point in the history
common: improve the PMEM RAS workflow output
  • Loading branch information
janekmi authored Jul 19, 2024
2 parents 0e4257f + c4d3b4e commit 8700315
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 16 deletions.
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

0 comments on commit 8700315

Please sign in to comment.