Skip to content

Commit

Permalink
autorun: add nvme testing if unittests pass
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Harris <[email protected]>
Change-Id: I6b616e8a8749803c9393d2dfd6e643cb56348b28
  • Loading branch information
jimharris committed Oct 31, 2024
1 parent 0326d60 commit 8972d5d
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 17 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/autorun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

autorun_unittest:
needs: source-archive
timeout-minutes: 15
timeout-minutes: 30
runs-on: [self-hosted, linux, x64, qemuhost]
env:
REPOSITORY_TARBALL_PATH: ${{ github.workspace }}/repository.tar.gz
Expand Down Expand Up @@ -96,14 +96,33 @@ jobs:
--workflow workflows/autorun_in_qemu.yaml \
--output report_prep_guest
- name: qemu-guest, autorun
- name: qemu-guest, autorun_unittest
run: |
cd ci/cijoe
cijoe autorun output_listing retrieve_autorun_output guest_shutdown \
cijoe autorun_unittest \
--monitor \
--config configs/qemuhost-with-guest-fedora-40.toml \
--workflow workflows/autorun_in_qemu.yaml \
--output report_autorun
--output report_autorun_unittest
- name: qemu-guest, autorun_nvme
run: |
cd ci/cijoe
cijoe autorun_nvme \
--monitor \
--config configs/qemuhost-with-guest-fedora-40.toml \
--workflow workflows/autorun_in_qemu.yaml \
--output report_autorun_nvme
- name: qemu-guest, cleanup
if: always()
run: |
cd ci/cijoe
cijoe output_listing retrieve_autorun_output guest_shutdown \
--monitor \
--config configs/qemuhost-with-guest-fedora-40.toml \
--workflow workflows/autorun_in_qemu.yaml \
--output report_cleanup
- name: Upload Artifacts
uses: actions/[email protected]
Expand All @@ -117,7 +136,9 @@ jobs:
if: always()
with:
path: |
ci/cijoe/report_autorun
ci/cijoe/report_autorun_nvme
ci/cijoe/report_autorun_unittest
ci/cijoe/report_cleanup
ci/cijoe/report_prep_guest
name: report-autorun-in-qemu

Expand Down
20 changes: 10 additions & 10 deletions cijoe/scripts/qemu_guest_start_custom_nvme.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,18 +231,18 @@ def namespace(controller_id, nsid, aux={}):
drives.append(drv_pi3)

# Nvme4n4 - NVM namespace with PI type 1 and extended LBA
drv_pi1_ex, qemu_nvme_dev_pi1_ex = namespace(
controller_id5, 4, {"ms": 8, "mset": 1, "pi": 1}
)
nvme += qemu_nvme_dev_pi1_ex
drives.append(drv_pi1_ex)
#drv_pi1_ex, qemu_nvme_dev_pi1_ex = namespace(
# controller_id5, 4, {"ms": 8, "mset": 1, "pi": 1}
#)
#nvme += qemu_nvme_dev_pi1_ex
#drives.append(drv_pi1_ex)

# Nvme4n5 - NVM namespace with PI type 1 and PIF 2
drv_pi1_pif2, qemu_nvme_dev_pi1_pif2 = namespace(
controller_id5, 5, {"ms": 16, "pi": 1, "pif": 2}
)
nvme += qemu_nvme_dev_pi1_pif2
drives.append(drv_pi1_pif2)
#drv_pi1_pif2, qemu_nvme_dev_pi1_pif2 = namespace(
# controller_id5, 5, {"ms": 16, "pi": 1, "pif": 2}
#)
#nvme += qemu_nvme_dev_pi1_pif2
#drives.append(drv_pi1_pif2)

return drives, nvme

Expand Down
12 changes: 10 additions & 2 deletions cijoe/workflows/autorun_in_qemu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,18 @@ steps:
mkdir /opt/spdk
tar xzf /tmp/repository.tar.gz -C /opt/spdk
- name: autorun
- name: autorun_unittest
run: |
mkdir -p /opt/output/unittest
echo "SPDK_TEST_UNITTEST=1" > /tmp/auto.conf
/opt/spdk/autorun.sh /tmp/auto.conf
output_dir=/opt/output/unittest /opt/spdk/autorun.sh /tmp/auto.conf
- name: autorun_nvme
run: |
mkdir -p /opt/output/nvme
echo "SPDK_RUN_FUNCTIONAL_TEST=1" > /tmp/auto.conf
echo "SPDK_TEST_NVME=1" >> /tmp/auto.conf
output_dir=/opt/output/nvme /opt/spdk/autorun.sh /tmp/auto.conf
- name: output_listing
run: |
Expand Down

0 comments on commit 8972d5d

Please sign in to comment.